NAV
bash javascript

Info

Welcome to the generated API reference. Get Postman Collection

1.1 Admin management

Page Group To manage Admin data & Lists Stats Of The Site In General .

Dashboard


Requires authentication Is A Dashboard Page That Shows Lists Of Stats & General Data Of The Site In General That admin can view stats and make decisions from the stats brief in front of him to manage the site more efficient .

Example request:

curl -X GET \
    -G "http://localhost/closor/public/admin/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/admin/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "workplaces_count": 19,
    "products_count": 28,
    "users_count": 32,
    "leads_count": 86
}

HTTP Request

GET admin/dashboard

1.2 Admin Moderator management

Page Group To manage Moderator data For The Admin Control Panel .

Moderators View Page


Requires authentication Is An Admin-Panel Moderator Page That Views Moderators Data Info .

Example request:

curl -X GET \
    -G "http://localhost/closor/public/admin/moderator" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/admin/moderator"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 2,
    "name": "Demo Mato",
    "phone": 123456789,
    "email": "test@demo.com",
    "created_at": "2020-12-29 14:13:08",
    "updated_at": "2020-12-29 14:13:08",
    "role": 1
}

HTTP Request

GET admin/moderator

Moderator Create Page


Requires authentication Is An Admin-Panel Moderator Page That Creates Moderators To Manage The Web Site Generally .

Example request:

curl -X GET \
    -G "http://localhost/closor/public/admin/moderator/create" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"name":"demo","email":"test@demo.com","phone":123456789,"zones":"Alex"}'
const url = new URL(
    "http://localhost/closor/public/admin/moderator/create"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "demo",
    "email": "test@demo.com",
    "phone": 123456789,
    "zones": "Alex"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 2,
    "name": "Demo Mato",
    "phone": 123456789,
    "email": "test@demo.com",
    "created_at": "2020-12-29 14:13:08",
    "updated_at": "2020-12-29 14:13:08",
    "role": 1
}

HTTP Request

GET admin/moderator/create

Body Parameters

Parameter Type Status Description
name string required The name of the user.
email string required The email of the user.
phone integer required The phone of the user.
zones string optional The Zone selected of the user.

Moderator Store Data


Requires authentication Is An Admin-Panel Moderator Data Request That Stores Moderators Data To Database .

Example request:

curl -X POST \
    "http://localhost/closor/public/admin/moderator" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/admin/moderator"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST admin/moderator

Moderator Edit Page


Requires authentication Is An Admin-Panel Moderator Page That Edits Moderators To Manage The Web Site Generally .

Example request:

curl -X GET \
    -G "http://localhost/closor/public/admin/moderator/1/edit" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"name":"demo .","email":"test@demo.com .","phone":123456789,"zones":"Alex ."}'
const url = new URL(
    "http://localhost/closor/public/admin/moderator/1/edit"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "demo .",
    "email": "test@demo.com .",
    "phone": 123456789,
    "zones": "Alex ."
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 2,
    "name": "Demo Mato",
    "phone": 123456789,
    "email": "test@demo.com",
    "created_at": "2020-12-29 14:13:08",
    "updated_at": "2020-12-29 14:13:08",
    "role": 1
}

HTTP Request

GET admin/moderator/{moderator}/edit

Body Parameters

Parameter Type Status Description
name string required The name of the user.
email string required The email of the user.
phone integer required The phone of the user.
zones string optional The Zone selected of the user.

Moderator Update Data


Requires authentication Is An Admin-Panel Moderator Data Request That Updates Moderators Data To Database .

Example request:

curl -X PUT \
    "http://localhost/closor/public/admin/moderator/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/admin/moderator/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT admin/moderator/{moderator}

PATCH admin/moderator/{moderator}

Moderator Delete Data


Requires authentication Is An Admin-Panel Moderator Data Request That Delete Moderators Data From Database .

Example request:

curl -X DELETE \
    "http://localhost/closor/public/admin/moderator/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/admin/moderator/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE admin/moderator/{moderator}

1.3 Admin Users management

Page Group To manage Users data For The Admin Control Panel .

Users View Page


Requires authentication Is An Admin-Panel User Page That Views users Data Info .

Form Filter is used to filtering existing Users To get better results .

View users Data Info

Example request:

curl -X GET \
    -G "http://localhost/closor/public/admin/user" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/admin/user"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "name": "demo",
    "phone": "01234567890",
    "country_code": null,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-01-26 16:26:56",
    "updated_at": "2021-01-07 13:35:48",
    "device_token": null,
    "os": null,
    "is_available": 1,
    "products_count": 2,
    "workplaces_count": 1,
    "leads_count": 7
}

HTTP Request

GET admin/user

Users View Page


Requires authentication Is An Admin-Panel User Page That Views users Data Info .

Form Filter is used to filtering existing Users To get better results .

View users Data Info

Example request:

curl -X POST \
    "http://localhost/closor/public/admin/user" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/admin/user"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "name": "demo",
    "phone": "01234567890",
    "country_code": null,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-01-26 16:26:56",
    "updated_at": "2021-01-07 13:35:48",
    "device_token": null,
    "os": null,
    "is_available": 1,
    "products_count": 2,
    "workplaces_count": 1,
    "leads_count": 7
}

HTTP Request

POST admin/user

Manage Users From the Enable & Disable Button


Requires authentication

Example request:

curl -X GET \
    -G "http://localhost/closor/public/admin/user_available/1/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/admin/user_available/1/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET admin/user_available/{user}/{is_available}

1.4 Admin Zone management

Page Group To manage Zone data For The Admin Control Panel .

Zones View Page


Requires authentication Is An Admin-Panel Zone Page That Views Zones Data Info .

View Zones Data Info

Example request:

curl -X GET \
    -G "http://localhost/closor/public/admin/zone" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/admin/zone"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 2,
    "name": "Test",
    "created_at": "2020-12-29 14:07:43",
    "updated_at": "2020-12-29 14:07:43",
    "countries": [
        {
            "id": 2,
            "iso": "AL",
            "name": "ALBANIA",
            "nicename": "Albania",
            "iso3": "ALB",
            "numcode": 8,
            "phonecode": 355,
            "pivot": {
                "zone_id": 2,
                "country_id": 2
            }
        }
    ]
}

HTTP Request

GET admin/zone

Zone Create Page


Requires authentication Is An Admin-Panel Zone Page That Creates Zones To Manage The Web Site Generally .

Example request:

curl -X GET \
    -G "http://localhost/closor/public/admin/zone/create" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"name":"demo","Countries":"Alex"}'
const url = new URL(
    "http://localhost/closor/public/admin/zone/create"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "demo",
    "Countries": "Alex"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 2,
    "name": "Demo Mato",
    "countries": "ALBANIA"
}

HTTP Request

GET admin/zone/create

Body Parameters

Parameter Type Status Description
name string required The name of the zone.
Countries string required The Countries selected of the zone.

Zone Store Data


Requires authentication Is An Admin-Panel Zone Data Request That Stores Zones Data To Database .

Example request:

curl -X POST \
    "http://localhost/closor/public/admin/zone" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/admin/zone"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST admin/zone

Zone Edit Page


Requires authentication Is An Admin-Panel Zone Page That Edits Zones To Manage The Web Site Generally .

Example request:

curl -X GET \
    -G "http://localhost/closor/public/admin/zone/1/edit" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"name":"demo","Countries":"Alex"}'
const url = new URL(
    "http://localhost/closor/public/admin/zone/1/edit"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "demo",
    "Countries": "Alex"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 2,
    "name": "Demo",
    "countries": "ALBANIA"
}

HTTP Request

GET admin/zone/{zone}/edit

Body Parameters

Parameter Type Status Description
name string required The name of the zone.
Countries string required The Countries selected of the zone.

Zone Update Data


Requires authentication Is An Admin-Panel Zone Data Request That Updates Zones Data To Database .

Example request:

curl -X PUT \
    "http://localhost/closor/public/admin/zone/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/admin/zone/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT admin/zone/{zone}

PATCH admin/zone/{zone}

Zone Delete Data


Requires authentication Is An Admin-Panel Zone Data Request That Delete Zones Data From Database .

Example request:

curl -X DELETE \
    "http://localhost/closor/public/admin/zone/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/admin/zone/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE admin/zone/{zone}

1.5 Admin Workplaces management

Page Group To manage Workplaces data For The Admin Control Panel .

Workplaces View Page


Requires authentication Is An Admin-Panel Workplace Page That Views Workplaces Data Info .

Form Filter is used to filtering existing workplaces To get better results .

View Workplace Data Info

Example request:

curl -X GET \
    -G "http://localhost/closor/public/admin/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/admin/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET admin/workplace

Workplaces View Page


Requires authentication Is An Admin-Panel Workplace Page That Views Workplaces Data Info .

Form Filter is used to filtering existing workplaces To get better results .

View Workplace Data Info

Example request:

curl -X POST \
    "http://localhost/closor/public/admin/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/admin/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

POST admin/workplace

Single Workplace Info View Page


Requires authentication Is An Admin-Panel Page For Single Workplace That Views Workplace Data Info .

Example request:

curl -X GET \
    -G "http://localhost/closor/public/admin/workplace-info/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/admin/workplace-info/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET admin/workplace-info/{workplace_id}

Single Workplace Team Info View Page


Requires authentication Is An Admin-Panel Page Workplace Team That Views Workplaces Team Data Info That is assigned to the product to manage into the workplaces .

View Workplace Single Product Team Info & Roles

Example request:

curl -X GET \
    -G "http://localhost/closor/public/admin/1/team/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/admin/1/team/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

GET admin/{workplace_id}/team/{product_id}

1.6 Admin Leads management

Page Group To manage Leads data For The Admin Control Panel .

Leads View Page


Requires authentication Is An Admin-Panel Lead Page That Views leads Data Info .

Form Filter is used to filtering existing leads To get better results .

View leads Data Info

-View Leads Stats the Qualified & Un Qualified Buttons .

Example request:

curl -X GET \
    -G "http://localhost/closor/public/admin/lead" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/admin/lead"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "name": "demo",
    "phone": "01234567890",
    "country_code": null,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-01-26 16:26:56",
    "updated_at": "2021-01-07 13:35:48",
    "device_token": null,
    "os": null,
    "is_available": 1,
    "products_count": 2,
    "workplaces_count": 1,
    "leads_count": 7
}

HTTP Request

GET admin/lead

Leads View Page


Requires authentication Is An Admin-Panel Lead Page That Views leads Data Info .

Form Filter is used to filtering existing leads To get better results .

View leads Data Info

-View Leads Stats the Qualified & Un Qualified Buttons .

Example request:

curl -X POST \
    "http://localhost/closor/public/admin/lead" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/admin/lead"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "name": "demo",
    "phone": "01234567890",
    "country_code": null,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-01-26 16:26:56",
    "updated_at": "2021-01-07 13:35:48",
    "device_token": null,
    "os": null,
    "is_available": 1,
    "products_count": 2,
    "workplaces_count": 1,
    "leads_count": 7
}

HTTP Request

POST admin/lead

Single Lead Info View Page


Requires authentication Is An Admin-Panel Page For Single Lead That Views Lead Data Info .

Example request:

curl -X GET \
    -G "http://localhost/closor/public/admin/lead/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/admin/lead/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 9,
    "workplace_id": 8,
    "user_id": 7,
    "name": "Bottels Website Form",
    "country_id": null,
    "website": "https:\/\/popcorn.com",
    "product_id": 11,
    "widget_type": "text",
    "alignment": "left",
    "primary": "#34a853",
    "secondary": "#ffffff",
    "icon_type": "mdi mdi-phone fa-fw",
    "bubble": "on",
    "bubble_line_1": "Want to talk to an expert?",
    "bubble_line_2": "Our Team is 60 Second Away From You!",
    "bubble_bg_color": "#959a9e",
    "bubble_text_color": "#ffffff",
    "text_text": "Talk to sales expert now!",
    "text_round": 10
}

HTTP Request

GET admin/lead/{lead}

2.1 Users Get Data Behind the scene.

Routes for Getting Data Request for site :

Example request:

curl -X GET \
    -G "http://localhost/closor/public/phoneCode/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/phoneCode/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "phonecode": 355
}

HTTP Request

GET phoneCode/{code}

Personalize User Country Data info

Example request:

curl -X GET \
    -G "http://localhost/closor/public/isoCode/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/isoCode/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "iso": "AL",
    "name": "ALBANIA"
}

HTTP Request

GET isoCode/{code}

2.1 Users Home management

Page Group To manage General Data for site.

<<<<<<< HEAD

A Users Login View Page


Requires authentication User Login Page That Authenticates User license to use the site properly With his personalized data and getting his data from our database for him to serve him.

Example request:

curl -X GET \
    -G "/" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

null

HTTP Request

GET /

check


Requires authentication

Example request:

curl -X GET \
    -G "/check" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/check"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (302):

null

HTTP Request

GET check

======= >>>>>>> b1173c075fed74b525c020ce92d2c003db646a15

Widget View Page


Requires authentication Widget View Page That Views Product Widget at any site the did put in and it's so much customizable by the user customize options :

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/widgetView/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/widgetView/1"
=======
    -G "http://localhost/closor/public/widgetView/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/widgetView/1"
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

null

HTTP Request

GET widgetView/{id}

2.2 Users Users management

Page Group To manage Users data For The Manager Control Panel .

User Profile Page


Requires authentication Is An User Page That Views User Personal Data Info To The User That user can update it for later use.

View user Data Info

Example request:

curl -X GET \
<<<<<<< HEAD
<<<<<<< HEAD
    -G "/profile" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/profile"
=======
=======
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
    -G "http://localhost/closor/public/profile" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/profile"
<<<<<<< HEAD
>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f
=======
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "name": "demo",
    "phone": "01234567890",
    "country_code": null,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-01-26 16:26:56",
    "updated_at": "2021-01-07 13:35:48",
    "device_token": null,
    "os": null,
    "is_available": 1,
    "products_count": 2,
    "workplaces_count": 1,
    "leads_count": 7
}

HTTP Request

GET profile

User Update Data


Requires authentication User Data Request That Updates User Data To Database.

Example request:

curl -X PUT \
<<<<<<< HEAD
    "/profile/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/profile/1"
>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f
=======
    "http://localhost/closor/public/profile/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/profile/1"
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT profile/{profile}

PATCH profile/{profile}

Dashboard Page


Requires authentication Is A Dashboard Page That Shows Lists Of Stats & General Data Of The Site In General That User can view stats and make decisions from the stats brief in front of him to manage the Workplace more efficient.

Example request:

curl -X GET \
<<<<<<< HEAD
<<<<<<< HEAD
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
=======
=======
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
    -G "http://localhost/closor/public/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/dashboard"
<<<<<<< HEAD
>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f
=======
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "user_workplaces_count": 19,
    "invited_workplaces_count": 28
}

HTTP Request

GET dashboard

2.3 Users Workplaces management

Page Group To manage Workplaces data For The Manager Control Panel.

Workplaces View Page


Requires authentication Is An Control Panel Manager Workplace Page That Views Workplaces Data Info.

View Workplaces Data Info :

Example request:

curl -X GET \
<<<<<<< HEAD
<<<<<<< HEAD
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
=======
=======
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
    -G "http://localhost/closor/public/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/workplace"
<<<<<<< HEAD
>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f
=======
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET workplace

Workplace Create Page


Requires authentication Is An Control Panel Manager Page That Creates Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
    -G "/profile/create" \
=======
    -G "http://localhost/closor/public/workplace/create" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
=======
    -G "http://localhost/closor/public/workplace/create" \
>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f
=======
    -G "http://localhost/closor/public/workplace/create" \
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
    "/profile/create"
=======
    "http://localhost/closor/public/workplace/create"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
=======
    "http://localhost/closor/public/workplace/create"
>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f
=======
    "http://localhost/closor/public/workplace/create"
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

GET workplace/create

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
    "/profile" \
=======
=======
>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
<<<<<<< HEAD
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
=======
>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f
=======
    "http://localhost/closor/public/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/workplace"
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD <<<<<<< HEAD
<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
=======
curl -X PUT \
>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
<<<<<<< HEAD
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
=======
>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/workplace/1"
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data

<<<<<<< HEAD <<<<<<< HEAD ======= >>>>>>> b1173c075fed74b525c020ce92d2c003db646a15


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/workplace/1"
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
=======


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/workplace/1"
>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));
<<<<<<< HEAD

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));
<<<<<<< HEAD

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

=======

Example response (200):

>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

=======

GET invited_workplaces

>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

<<<<<<< HEAD =======

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f ======= >>>>>>> b1173c075fed74b525c020ce92d2c003db646a15

Example request:

curl -X GET \
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
=======
    -G "http://localhost/closor/public/invited_workplaces" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f
=======
    -G "http://localhost/closor/public/user_workplaces" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/user_workplaces"
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

=======

GET user_workplaces

Single Workplace Team Info View Page


Requires authentication Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

  • invite users with the invite button to manage the product that belongs to the workplace.

  • counter users that invited to a certain product.

View Workplace Single Product Team Info & Roles

  • View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15

Example request:

curl -X GET \
<<<<<<< HEAD
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
=======
    -G "http://localhost/closor/public/1/team" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/1/team"
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
<<<<<<< HEAD
    method: "DELETE",
=======
    method: "GET",
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
<<<<<<< HEAD
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

======= "id": 7, "name": "demo", "phone": "0123456789", "country_code": 20, "email": "test@demo.com", "email_verified_at": null, "created_at": "2020-02-03 21:36:19", "updated_at": "2020-12-09 01:46:55" }

HTTP Request

GET {workplace_id}/team

Single Workplace Team Info View Page


Requires authentication Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

  • invite users with the invite button to manage the product that belongs to the workplace.

  • counter users that invited to a certain product.

View Workplace Single Product Team Info & Roles

  • View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
=======
    -G "http://localhost/closor/public/1/team/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/1/team/1"
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));
<<<<<<< HEAD

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

=======

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

GET {workplace_id}/team/{product_id}

User Invite To Product Page


Requires authentication Is An Control Panel User Page That Invites user To Product And assign a role To work in the product with it.

>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15

Example request:

curl -X GET \
<<<<<<< HEAD
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Users Workplaces management

Page Group To manage Workplaces data For The Manager Control Panel.

  • View the Workplaces Data Ex. Title, Count of Products & Created By etc.

Workplaces View Page


Requires authentication Is An Control Panel Manager Workplace Page That Views Workplaces Data Info.

View Workplaces Data Info :

  • View the Workplace Data Ex. Title, Count of Products & Created By etc.

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET workplace

Workplace Create Page


Requires authentication Is An Control Panel Manager Page That Creates Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/create" \
=======
    -G "http://localhost/closor/public/workplace/create" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/create"
=======
    "http://localhost/closor/public/workplace/create"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

GET workplace/create

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
    -G "/user_workplaces" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/user_workplaces"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET user_workplaces

Single Workplace Team Info View Page

660258eec83947a55d2592e4429d552076db573f


Requires authentication Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

  • invite users with the invite button to manage the product that belongs to the workplace.

  • counter users that invited to a certain product.

View Workplace Single Product Team Info & Roles

  • View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Users Workplaces management

Page Group To manage Workplaces data For The Manager Control Panel.

  • View the Workplaces Data Ex. Title, Count of Products & Created By etc.

Workplaces View Page


Requires authentication Is An Control Panel Manager Workplace Page That Views Workplaces Data Info.

View Workplaces Data Info :

  • View the Workplace Data Ex. Title, Count of Products & Created By etc.

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET workplace

Workplace Create Page


Requires authentication Is An Control Panel Manager Page That Creates Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/create" \
=======
    -G "http://localhost/closor/public/workplace/create" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/create"
=======
    "http://localhost/closor/public/workplace/create"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

GET workplace/create

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Users Workplaces management

Page Group To manage Workplaces data For The Manager Control Panel.

  • View the Workplaces Data Ex. Title, Count of Products & Created By etc.

Workplaces View Page


Requires authentication Is An Control Panel Manager Workplace Page That Views Workplaces Data Info.

View Workplaces Data Info :

  • View the Workplace Data Ex. Title, Count of Products & Created By etc.

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET workplace

Workplace Create Page


Requires authentication Is An Control Panel Manager Page That Creates Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/create" \
=======
    -G "http://localhost/closor/public/workplace/create" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/create"
=======
    "http://localhost/closor/public/workplace/create"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

GET workplace/create

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
    -G "/user_workplaces" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/user_workplaces"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET user_workplaces

Single Workplace Team Info View Page

660258eec83947a55d2592e4429d552076db573f


Requires authentication Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

  • invite users with the invite button to manage the product that belongs to the workplace.

  • counter users that invited to a certain product.

View Workplace Single Product Team Info & Roles

  • View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Users Workplaces management

Page Group To manage Workplaces data For The Manager Control Panel.

  • View the Workplaces Data Ex. Title, Count of Products & Created By etc.

Workplaces View Page


Requires authentication Is An Control Panel Manager Workplace Page That Views Workplaces Data Info.

View Workplaces Data Info :

  • View the Workplace Data Ex. Title, Count of Products & Created By etc.

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET workplace

Workplace Create Page


Requires authentication Is An Control Panel Manager Page That Creates Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/create" \
=======
    -G "http://localhost/closor/public/workplace/create" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/create"
=======
    "http://localhost/closor/public/workplace/create"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

GET workplace/create

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
    -G "/user_workplaces" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/user_workplaces"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET user_workplaces

Single Workplace Team Info View Page

660258eec83947a55d2592e4429d552076db573f


Requires authentication Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

  • invite users with the invite button to manage the product that belongs to the workplace.

  • counter users that invited to a certain product.

View Workplace Single Product Team Info & Roles

  • View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Users Workplaces management

Page Group To manage Workplaces data For The Manager Control Panel.

  • View the Workplaces Data Ex. Title, Count of Products & Created By etc.

Workplaces View Page


Requires authentication Is An Control Panel Manager Workplace Page That Views Workplaces Data Info.

View Workplaces Data Info :

  • View the Workplace Data Ex. Title, Count of Products & Created By etc.

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET workplace

Workplace Create Page


Requires authentication Is An Control Panel Manager Page That Creates Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/create" \
=======
    -G "http://localhost/closor/public/workplace/create" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/create"
=======
    "http://localhost/closor/public/workplace/create"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

GET workplace/create

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Users Workplaces management

Page Group To manage Workplaces data For The Manager Control Panel.

  • View the Workplaces Data Ex. Title, Count of Products & Created By etc.

Workplaces View Page


Requires authentication Is An Control Panel Manager Workplace Page That Views Workplaces Data Info.

View Workplaces Data Info :

  • View the Workplace Data Ex. Title, Count of Products & Created By etc.

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET workplace

Workplace Create Page


Requires authentication Is An Control Panel Manager Page That Creates Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/create" \
=======
    -G "http://localhost/closor/public/workplace/create" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/create"
=======
    "http://localhost/closor/public/workplace/create"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

GET workplace/create

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
    -G "/user_workplaces" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/user_workplaces"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET user_workplaces

Single Workplace Team Info View Page

660258eec83947a55d2592e4429d552076db573f


Requires authentication Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

  • invite users with the invite button to manage the product that belongs to the workplace.

  • counter users that invited to a certain product.

View Workplace Single Product Team Info & Roles

  • View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Users Workplaces management

Page Group To manage Workplaces data For The Manager Control Panel.

  • View the Workplaces Data Ex. Title, Count of Products & Created By etc.

Workplaces View Page


Requires authentication Is An Control Panel Manager Workplace Page That Views Workplaces Data Info.

View Workplaces Data Info :

  • View the Workplace Data Ex. Title, Count of Products & Created By etc.

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET workplace

Workplace Create Page


Requires authentication Is An Control Panel Manager Page That Creates Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/create" \
=======
    -G "http://localhost/closor/public/workplace/create" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/create"
=======
    "http://localhost/closor/public/workplace/create"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

GET workplace/create

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
    -G "/user_workplaces" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/user_workplaces"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET user_workplaces

Single Workplace Team Info View Page

660258eec83947a55d2592e4429d552076db573f


Requires authentication Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

  • invite users with the invite button to manage the product that belongs to the workplace.

  • counter users that invited to a certain product.

View Workplace Single Product Team Info & Roles

  • View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Users Workplaces management

Page Group To manage Workplaces data For The Manager Control Panel.

  • View the Workplaces Data Ex. Title, Count of Products & Created By etc.

Workplaces View Page


Requires authentication Is An Control Panel Manager Workplace Page That Views Workplaces Data Info.

View Workplaces Data Info :

  • View the Workplace Data Ex. Title, Count of Products & Created By etc.

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET workplace

Workplace Create Page


Requires authentication Is An Control Panel Manager Page That Creates Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/create" \
=======
    -G "http://localhost/closor/public/workplace/create" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/create"
=======
    "http://localhost/closor/public/workplace/create"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

GET workplace/create

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
    -G "/user_workplaces" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/user_workplaces"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET user_workplaces

Single Workplace Team Info View Page

660258eec83947a55d2592e4429d552076db573f


Requires authentication Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

  • invite users with the invite button to manage the product that belongs to the workplace.

  • counter users that invited to a certain product.

View Workplace Single Product Team Info & Roles

  • View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Users Workplaces management

Page Group To manage Workplaces data For The Manager Control Panel.

  • View the Workplaces Data Ex. Title, Count of Products & Created By etc.

Workplaces View Page


Requires authentication Is An Control Panel Manager Workplace Page That Views Workplaces Data Info.

View Workplaces Data Info :

  • View the Workplace Data Ex. Title, Count of Products & Created By etc.

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET workplace

Workplace Create Page


Requires authentication Is An Control Panel Manager Page That Creates Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/create" \
=======
    -G "http://localhost/closor/public/workplace/create" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/create"
=======
    "http://localhost/closor/public/workplace/create"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

GET workplace/create

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
    -G "/user_workplaces" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/user_workplaces"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET user_workplaces

Single Workplace Team Info View Page

660258eec83947a55d2592e4429d552076db573f


Requires authentication Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

  • invite users with the invite button to manage the product that belongs to the workplace.

  • counter users that invited to a certain product.

View Workplace Single Product Team Info & Roles

  • View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Users Workplaces management

Page Group To manage Workplaces data For The Manager Control Panel.

  • View the Workplaces Data Ex. Title, Count of Products & Created By etc.

Workplaces View Page


Requires authentication Is An Control Panel Manager Workplace Page That Views Workplaces Data Info.

View Workplaces Data Info :

  • View the Workplace Data Ex. Title, Count of Products & Created By etc.

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET workplace

Workplace Create Page


Requires authentication Is An Control Panel Manager Page That Creates Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/create" \
=======
    -G "http://localhost/closor/public/workplace/create" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/create"
=======
    "http://localhost/closor/public/workplace/create"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

GET workplace/create

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
    -G "/user_workplaces" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/user_workplaces"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET user_workplaces

Single Workplace Team Info View Page

660258eec83947a55d2592e4429d552076db573f


Requires authentication Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

  • invite users with the invite button to manage the product that belongs to the workplace.

  • counter users that invited to a certain product.

View Workplace Single Product Team Info & Roles

  • View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
    -G "/user_workplaces" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/user_workplaces"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET user_workplaces

Single Workplace Team Info View Page

660258eec83947a55d2592e4429d552076db573f


Requires authentication Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

  • invite users with the invite button to manage the product that belongs to the workplace.

  • counter users that invited to a certain product.

View Workplace Single Product Team Info & Roles

  • View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Users Workplaces management

Page Group To manage Workplaces data For The Manager Control Panel.

  • View the Workplaces Data Ex. Title, Count of Products & Created By etc.

Workplaces View Page


Requires authentication Is An Control Panel Manager Workplace Page That Views Workplaces Data Info.

View Workplaces Data Info :

  • View the Workplace Data Ex. Title, Count of Products & Created By etc.

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET workplace

Workplace Create Page


Requires authentication Is An Control Panel Manager Page That Creates Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/create" \
=======
    -G "http://localhost/closor/public/workplace/create" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/create"
=======
    "http://localhost/closor/public/workplace/create"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

GET workplace/create

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Workplace Store Data


Requires authentication Is An Control Panel Manager Data Request That Stores Workplaces Data To Database.

Example request:

curl -X POST \
<<<<<<< HEAD
    "/profile" \
=======
    "http://localhost/closor/public/workplace" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile"
=======
    "http://localhost/closor/public/workplace"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Added Successfully"
}

HTTP Request

POST workplace

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.


Requires authentication

Example request:

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET workplace/{workplace}

Workplaces Edit Page


Requires authentication Is An Control Panel Manager Page That Edits Workplaces To Manage It later on the site by the manager and his team.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/profile/1" \
=======
    -G "http://localhost/closor/public/workplace/1/edit" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"demo","timezone":"(GMT+02:00) Cairo","website":"www.demo.com","startday":"Monday"}'
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1/edit"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "demo",
    "timezone": "(GMT+02:00) Cairo",
    "website": "www.demo.com",
    "startday": "Monday"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

GET workplace/{workplace}/edit

Body Parameters

Parameter Type Status Description
title string required The title of the workplace.
timezone string required The timezone selected of the workplace.
website string optional The website of the workplace.
startday string required The startday selected of Week Start ON for the workplace.

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
    -G "/user_workplaces" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/user_workplaces"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

GET user_workplaces

Single Workplace Team Info View Page

660258eec83947a55d2592e4429d552076db573f


Requires authentication Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

  • invite users with the invite button to manage the product that belongs to the workplace.

  • counter users that invited to a certain product.

View Workplace Single Product Team Info & Roles

  • View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Workplace Update Data


Requires authentication Is An Control Panel Manager Data Request That Updates Workplaces Data To Database.

Example request:

<<<<<<< HEAD
curl -X GET \
    -G "/profile/1/edit" \
=======
curl -X PUT \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1/edit"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Updated Successfully"
}

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
<<<<<<< HEAD
    -G "/workplace/create" \
=======
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Workplace Delete Data


Requires authentication Is An Control Panel Workplace Data Request That Delete Workplaces Data From Database .

Example request:

<<<<<<< HEAD
curl -X PUT \
    "/profile/1" \
=======
curl -X DELETE \
    "http://localhost/closor/public/workplace/1" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/workplace/1"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Deleted Successfully"
}

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/workplace/create" \
=======
=======
>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f
    -G "http://localhost/closor/public/user_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/create"
=======
    "http://localhost/closor/public/user_workplaces"
<<<<<<< HEAD
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
=======
>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD

<<<<<<< HEAD GET workplace/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST workplace

Display the specified resource.

======= GET user_workplaces

660258eec83947a55d2592e4429d552076db573f

<<<<<<< HEAD

curl -X GET \
    -G "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);
=======
<!-- END_2d7929f290ae72d939e89b7e232cdffb -->

<!-- START_46c3c689207155a26adf42e4d5418a3f -->
## Single Workplace Team Info View Page
>>>>>>> 660258eec83947a55d2592e4429d552076db573f

<br><small style="padding: 1px 9px 2px;font-weight: bold;white-space: nowrap;color: #ffffff;-webkit-border-radius: 9px;-moz-border-radius: 9px;border-radius: 9px;background-color: #3a87ad;">Requires authentication</small>
Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

- invite users with the invite button to manage the product that belongs to the workplace.

<p><img src="images/admin/workplaces/admin-workplaces-invite.png" width="100%"></p>

- counter users that invited to a certain product.

<p><img src="images/admin/workplaces/admin-workplaces-counter.png" width="100%"></p>

View Workplace Single Product Team Info & Roles

- View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

<p><img src="images/admin/workplaces/admin-workplace-team.png" width="100%"></p>

> Example request:

```bash
curl -X GET \
<<<<<<< HEAD
    -G "/workplace/1/edit" \
=======
    -G "http://localhost/closor/public/1/team" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/workplace/1/edit"
=======
    "http://localhost/closor/public/1/team"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

<<<<<<< HEAD GET workplace/{workplace}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT workplace/{workplace}

PATCH workplace/{workplace}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "/workplace/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE workplace/{workplace}

Invited Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Invited to.

Example request:

<<<<<<< HEAD
curl -X DELETE \
    "/profile/1" \
=======
curl -X GET \
    -G "http://localhost/closor/public/invited_workplaces" \
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
<<<<<<< HEAD
    "/profile/1"
=======
    "http://localhost/closor/public/invited_workplaces"
>>>>>>> 660258eec83947a55d2592e4429d552076db573f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

<<<<<<< HEAD

HTTP Request

DELETE profile/{profile}

dashboard

Example request:

curl -X GET \
    -G "/dashboard" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/dashboard"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

Example response (200):

660258eec83947a55d2592e4429d552076db573f

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

<<<<<<< HEAD GET dashboard

2.3 Workplaces management

Routes To manage Workplaces data For The Manager Control Panel

workplace

Example request:

curl -X GET \
    -G "/workplace" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/workplace"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

======= GET invited_workplaces

660258eec83947a55d2592e4429d552076db573f

User Workplaces Page


Requires authentication Is An Control Panel User Page That shows the user The Workplaces That User Is The Owner.

Example request:

curl -X GET \
    -G "/user_workplaces" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/user_workplaces"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 1,
    "admin_id": 7,
    "title": "Sherkat",
    "created_at": "2020-02-14 23:08:32",
    "updated_at": "2020-06-21 07:21:07",
    "timezone": "Africa\/Cairo",
    "website": null,
    "startday": "Monday",
    "products_count": 5,
    "users_count": 5,
    "leads_count": 12
}

HTTP Request

======= >>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f

GET user_workplaces

Single Workplace Team Info View Page


Requires authentication Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

  • invite users with the invite button to manage the product that belongs to the workplace.

  • counter users that invited to a certain product.

View Workplace Single Product Team Info & Roles

  • View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/1/team" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/1/team"
=======
    -G "http://localhost/closor/public/1/team" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/1/team"
>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

GET {workplace_id}/team

Single Workplace Team Info View Page


Requires authentication Is An Control Panel Page Workplace Team That Views Certain Workplace Team Data Info That is assigned to the product to manage into the workplace.

  • invite users with the invite button to manage the product that belongs to the workplace.

  • counter users that invited to a certain product.

View Workplace Single Product Team Info & Roles

  • View the Workplace Single Product Team Info & Roles Ex. User Name, Products Names That Assigned to the user & User role, etc.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/1/team/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/1/team/1"
=======
    -G "http://localhost/closor/public/1/team/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/1/team/1"
>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "id": 7,
    "name": "demo",
    "phone": "0123456789",
    "country_code": 20,
    "email": "test@demo.com",
    "email_verified_at": null,
    "created_at": "2020-02-03 21:36:19",
    "updated_at": "2020-12-09 01:46:55"
}

HTTP Request

GET {workplace_id}/team/{product_id}

User Invite To Product Page


Requires authentication Is An Control Panel User Page That Invites user To Product And assign a role To work in the product with it.

Example request:

curl -X GET \
<<<<<<< HEAD
    -G "/invite/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/invite/1"
=======
=======
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
    -G "http://localhost/closor/public/invite/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/invite/1"
<<<<<<< HEAD
>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f
=======
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "User invited To Product Successfully"
}

HTTP Request

GET invite/{workplace}

User Invite To Product Request


Requires authentication Is An Control Panel User Request That Invites users To Product And assign a role To work in the product with it.

Example request:

curl -X POST \
<<<<<<< HEAD
<<<<<<< HEAD
    "/invite_member_workplace" \
=======
    "http://localhost/closor/public/invite_member_workplace" \
>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f
=======
    "http://localhost/closor/public/invite_member_workplace" \
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"email":"test@demo.com","products":"Product","role":0}'
const url = new URL(
<<<<<<< HEAD
<<<<<<< HEAD
    "/invite_member_workplace"
=======
    "http://localhost/closor/public/invite_member_workplace"
>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f
=======
    "http://localhost/closor/public/invite_member_workplace"
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "test@demo.com",
    "products": "Product",
    "role": 0
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "User invited To Product Successfully"
}

HTTP Request

POST invite_member_workplace

Body Parameters

Parameter Type Status Description
email string optional The email of the workplace.
products string required The products selected That Assigned To User.
role integer required The role selected of User permission on certin product.

Edit User Role


Requires authentication Is An Control Panel User Request That Updates User Role To Database.

Example request:

curl -X POST \
    "http://localhost/closor/public/edit_user_role" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/edit_user_role"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "Role Updated Successfully"
}

HTTP Request

POST edit_user_role

User Workplaces Remove Request


Requires authentication Is An Control Panel User Request That Removes user From Workplaces.

Example request:

curl -X GET \
    -G "http://localhost/closor/public/remove_user_from_workspace/1/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/remove_user_from_workspace/1/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "User Removed From The workspace Successfully"
}

HTTP Request

GET remove_user_from_workspace/{user_id}/{workplace_id}

User Workplaces active Request


Requires authentication Is An Control Panel User Request That actives user From Workplaces.

Example request:

curl -X GET \
    -G "http://localhost/closor/public/active_user_in_workspace/1/1/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/active_user_in_workspace/1/1/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": "User actived At workspace Successfully"
}

HTTP Request

GET active_user_in_workspace/{status}/{user_id}/{workplace_id}

2.4 Users WorkPlace Products management

Routes To manage WorkPlace Products data For The Manager Control Panel

product

<<<<<<< HEAD <<<<<<< HEAD ======= ======= >>>>>>> b1173c075fed74b525c020ce92d2c003db646a15

Example request:

curl -X GET \
    -G "http://localhost/closor/public/product" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/product"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET product

Show the form for creating a new resource.

<<<<<<< HEAD >>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f ======= >>>>>>> b1173c075fed74b525c020ce92d2c003db646a15

Example request:

curl -X GET \
    -G "http://localhost/closor/public/product/create" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/product/create"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET product/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "http://localhost/closor/public/product" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/product"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST product

Display the specified resource.

Example request:

curl -X GET \
    -G "http://localhost/closor/public/product/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/product/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET product/{product}

Show the form for editing the specified resource.

Example request:

curl -X GET \
    -G "http://localhost/closor/public/product/1/edit" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/product/1/edit"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET product/{product}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "http://localhost/closor/public/product/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/product/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT product/{product}

PATCH product/{product}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "http://localhost/closor/public/product/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/product/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE product/{product}

Show the form for creating a new resource.

Example request:

curl -X GET \
    -G "http://localhost/closor/public/product/create/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/product/create/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET product/create/{workplace_id}

invite_member

Example request:

curl -X POST \
    "http://localhost/closor/public/invite_member" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/invite_member"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST invite_member

{workplace_id}/products

Example request:

curl -X GET \
    -G "http://localhost/closor/public/1/products" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/1/products"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET {workplace_id}/products

choose_members

Example request:

curl -X POST \
    "http://localhost/closor/public/choose_members" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/choose_members"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST choose_members

add_product_to_user

Example request:

curl -X POST \
    "http://localhost/closor/public/add_product_to_user" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/add_product_to_user"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST add_product_to_user

2.5 Users Lead Sources management

Routes To manage Lead Sources data For The Manager Control Panel

Display a listing of the resource.

Example request:

curl -X GET \
    -G "http://localhost/closor/public/sources" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/sources"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));
<<<<<<< HEAD =======

Example response (500):

{
    "message": "Server Error"
}
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15

HTTP Request

GET sources

Show the form for creating a new resource.

Example request:

curl -X GET \
    -G "http://localhost/closor/public/sources/create" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/sources/create"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));
<<<<<<< HEAD =======

Example response (500):

{
    "message": "Server Error"
}
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15

HTTP Request

GET sources/create

Store a newly created resource in storage.

Example request:

curl -X POST \
    "http://localhost/closor/public/sources" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/sources"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST sources

Display the specified resource.

Example request:

curl -X GET \
    -G "http://localhost/closor/public/sources/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/sources/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

GET sources/{source}

Show the form for editing the specified resource.

Example request:

curl -X GET \
    -G "http://localhost/closor/public/sources/1/edit" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/sources/1/edit"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));
<<<<<<< HEAD =======

Example response (500):

{
    "message": "Server Error"
}
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15

HTTP Request

GET sources/{source}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "http://localhost/closor/public/sources/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/sources/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT sources/{source}

PATCH sources/{source}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "http://localhost/closor/public/sources/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/sources/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE sources/{source}

2.6 Users Manager Leads management

Routes To manage Leads data For The Manager Control Panel

Display a listing of the resource.

Example request:

curl -X GET \
    -G "http://localhost/closor/public/leads" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/leads"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

null

HTTP Request

GET leads

Show the form for creating a new resource.

Example request:

curl -X GET \
    -G "http://localhost/closor/public/leads/create" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/leads/create"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET leads/create

Display a listing of the resource.

Example request:

curl -X POST \
    "http://localhost/closor/public/leads" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/leads"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

null

HTTP Request

POST leads

leads/{lead}

Example request:

curl -X GET \
    -G "http://localhost/closor/public/leads/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/leads/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET leads/{lead}

Show the form for editing the specified resource.

Example request:

curl -X GET \
    -G "http://localhost/closor/public/leads/1/edit" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/leads/1/edit"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET leads/{lead}/edit

Update the specified resource in storage.

Example request:

curl -X PUT \
    "http://localhost/closor/public/leads/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/leads/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT leads/{lead}

PATCH leads/{lead}

Remove the specified resource from storage.

Example request:

curl -X DELETE \
    "http://localhost/closor/public/leads/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/leads/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE leads/{lead}

2.7 Users Product Widget management

Routes To manage Product Widget View data For Leads

widget/{id}

Example request:

curl -X GET \
    -G "http://localhost/closor/public/widget/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/widget/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

null

HTTP Request

GET widget/{id}

widgetView/widget

Example request:

curl -X POST \
    "http://localhost/closor/public/widgetView/widget" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/widgetView/widget"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST widgetView/widget

3.1 APIs User management

APIs for managing users

api/login

Example request:

curl -X POST \
    "http://localhost/closor/public/api/login" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/api/login"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/login

api/login1

Example request:

curl -X POST \
    "http://localhost/closor/public/api/login1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/api/login1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/login1

api/login2

Example request:

curl -X POST \
    "http://localhost/closor/public/api/login2" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/api/login2"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/login2

api/update_profile

Example request:

curl -X POST \
    "http://localhost/closor/public/api/update_profile" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/api/update_profile"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/update_profile

api/change_is_available

Example request:

curl -X POST \
    "http://localhost/closor/public/api/change_is_available" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/api/change_is_available"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/change_is_available

3.2 APIs Workplaces management

APIs for managing Workplaces

api/widgetView/widget

Example request:

curl -X POST \
    "http://localhost/closor/public/api/widgetView/widget" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/api/widgetView/widget"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/widgetView/widget

api/lead

Example request:

curl -X POST \
    "http://localhost/closor/public/api/lead" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/api/lead"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/lead

api/all_workplaces

Example request:

curl -X GET \
    -G "http://localhost/closor/public/api/all_workplaces" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/api/all_workplaces"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "code": "0",
    "data": [
        {
            "id": 1,
            "admin_id": 7,
            "title": "Sherkat",
            "created_at": "2020-02-14 23:08:32",
            "updated_at": "2020-06-21 07:21:07",
            "timezone": "Africa\/Cairo",
            "website": null,
            "startday": "Monday",
            "times": {
                "id": 3,
                "workplace_id": 1,
                "sun_start": null,
                "sun_end": null,
                "mon_start": null,
                "mon_end": null,
                "tue_start": null,
                "tue_end": null,
                "wed_start": null,
                "wed_end": null,
                "thu_start": null,
                "thu_end": null,
                "fri_start": null,
                "fri_end": null,
                "sat_start": null,
                "sat_end": null,
                "created_at": "2020-06-21 07:21:07",
                "updated_at": "2020-06-21 07:21:07"
            },
            "admin": {
                "id": 7,
                "name": "Ahmed El Sayed",
                "phone": "01016789919",
                "country_code": 20,
                "email": "info@ahmedmohsen.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 21:36:19",
                "updated_at": "2020-12-09 01:46:55",
                "device_token": "dmmeB3QTTu2W2a0SWtocAs:APA91bH939MH0oUNORQ7obg7NlMtoreOSQUn39p6LqlzLaGXJ_ZAATtEg9vNAHV27H9Btc4YknrX7NFXLTCKmVq44USjJq3Y34Wi4D9gsjUda6Fdwkymw9YNA2AOYaQXfsNeg-Ma7xqs",
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 2,
            "admin_id": 1,
            "title": "American center",
            "created_at": "2020-02-16 11:30:38",
            "updated_at": "2020-02-16 11:30:38",
            "timezone": "Africa\/Cairo",
            "website": null,
            "startday": "Monday",
            "times": null,
            "admin": {
                "id": 1,
                "name": "kareem",
                "phone": "01234567890",
                "country_code": null,
                "email": "a7medkamal775@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-01-26 16:26:56",
                "updated_at": "2021-01-07 14:07:05",
                "device_token": null,
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 3,
            "admin_id": 5,
            "title": "malex",
            "created_at": "2020-02-16 17:04:11",
            "updated_at": "2020-02-16 17:04:11",
            "timezone": "Africa\/Cairo",
            "website": "https:\/\/malexs.net\/",
            "startday": "Monday",
            "times": null,
            "admin": {
                "id": 5,
                "name": "m7moodali88",
                "phone": "01234567890",
                "country_code": null,
                "email": "m7moodali88@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 20:45:19",
                "updated_at": "2020-10-03 00:22:13",
                "device_token": "duDRCpVhQweXCVT07O_TYX:APA91bEz7pM5PNLinhK2SmDxgYoE4UESX86cVXFP-jTRJhxiFKUkAfl8vQAk90cOv2ceCXZNoANzFxbsNsuhv1WSUcDs5g2uOPreSJifE2M4asUqtwXmS-vKWPwEu5Iu9UVZmzFSo1zw",
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 4,
            "admin_id": 5,
            "title": "Vola",
            "created_at": "2020-02-16 17:06:38",
            "updated_at": "2020-02-16 17:06:38",
            "timezone": "US\/Arizona",
            "website": "https:\/\/vola.net\/",
            "startday": "Monday",
            "times": null,
            "admin": {
                "id": 5,
                "name": "m7moodali88",
                "phone": "01234567890",
                "country_code": null,
                "email": "m7moodali88@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 20:45:19",
                "updated_at": "2020-10-03 00:22:13",
                "device_token": "duDRCpVhQweXCVT07O_TYX:APA91bEz7pM5PNLinhK2SmDxgYoE4UESX86cVXFP-jTRJhxiFKUkAfl8vQAk90cOv2ceCXZNoANzFxbsNsuhv1WSUcDs5g2uOPreSJifE2M4asUqtwXmS-vKWPwEu5Iu9UVZmzFSo1zw",
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 5,
            "admin_id": 13,
            "title": "kamal",
            "created_at": "2020-02-17 22:25:08",
            "updated_at": "2020-02-17 22:25:08",
            "timezone": "Africa\/Cairo",
            "website": "kamal.com",
            "startday": "Monday",
            "times": null,
            "admin": {
                "id": 13,
                "name": "mohamed fathy",
                "phone": "1987654321",
                "country_code": null,
                "email": "fathy@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-02-17 22:23:39",
                "updated_at": "2020-02-17 22:23:39",
                "device_token": null,
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 6,
            "admin_id": 2,
            "title": "My work",
            "created_at": "2020-02-20 04:39:36",
            "updated_at": "2020-02-20 04:39:36",
            "timezone": "Africa\/Cairo",
            "website": null,
            "startday": "Monday",
            "times": null,
            "admin": {
                "id": 2,
                "name": "ahmed kamal",
                "phone": "123456789",
                "country_code": null,
                "email": "kamal@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-01-27 13:18:17",
                "updated_at": "2020-12-28 15:23:53",
                "device_token": null,
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 7,
            "admin_id": 10,
            "title": "My Clinic",
            "created_at": "2020-05-12 18:37:37",
            "updated_at": "2020-05-12 18:37:37",
            "timezone": "Africa\/Cairo",
            "website": "https:\/\/clinic.com",
            "startday": "Monday",
            "times": {
                "id": 1,
                "workplace_id": 7,
                "sun_start": "08:00",
                "sun_end": "14:00",
                "mon_start": null,
                "mon_end": null,
                "tue_start": null,
                "tue_end": null,
                "wed_start": null,
                "wed_end": null,
                "thu_start": null,
                "thu_end": null,
                "fri_start": null,
                "fri_end": null,
                "sat_start": null,
                "sat_end": null,
                "created_at": "2020-05-12 18:37:37",
                "updated_at": "2020-05-12 18:37:37"
            },
            "admin": {
                "id": 10,
                "name": "Mohsenous",
                "phone": "01016789919",
                "country_code": 20,
                "email": "egyman1973@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-02-11 02:43:25",
                "updated_at": "2020-11-22 01:42:19",
                "device_token": "doYFKchDQ86kNKRqRoeW4a:APA91bEThH-qW8kXZYLkQ3pZLAyaDytqc7QnOBIvqBhZDi_oxjxUWiInlLam4Xt6kWbWf53Um-eXL9Eb8ozjSMRO-UPggfka7ehr7L7f4Z200GeIpy707pXknMc39G1ot04n6MTOQOGM",
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 8,
            "admin_id": 7,
            "title": "Popcorn",
            "created_at": "2020-06-21 04:15:55",
            "updated_at": "2020-06-21 04:20:16",
            "timezone": "Africa\/Cairo",
            "website": "https:\/\/popcorn.com",
            "startday": "Monday",
            "times": {
                "id": 2,
                "workplace_id": 8,
                "sun_start": "08:00",
                "sun_end": "18:00",
                "mon_start": "08:00",
                "mon_end": "18:00",
                "tue_start": "08:00",
                "tue_end": "18:00",
                "wed_start": "08:00",
                "wed_end": "18:00",
                "thu_start": "08:00",
                "thu_end": "18:00",
                "fri_start": "08:00",
                "fri_end": "18:00",
                "sat_start": "08:00",
                "sat_end": "18:00",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:20:16"
            },
            "admin": {
                "id": 7,
                "name": "Ahmed El Sayed",
                "phone": "01016789919",
                "country_code": 20,
                "email": "info@ahmedmohsen.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 21:36:19",
                "updated_at": "2020-12-09 01:46:55",
                "device_token": "dmmeB3QTTu2W2a0SWtocAs:APA91bH939MH0oUNORQ7obg7NlMtoreOSQUn39p6LqlzLaGXJ_ZAATtEg9vNAHV27H9Btc4YknrX7NFXLTCKmVq44USjJq3Y34Wi4D9gsjUda6Fdwkymw9YNA2AOYaQXfsNeg-Ma7xqs",
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 9,
            "admin_id": 18,
            "title": "menuhat",
            "created_at": "2020-07-22 22:43:14",
            "updated_at": "2020-07-22 22:43:14",
            "timezone": "Africa\/Cairo",
            "website": "https:\/\/menuhat.online\/",
            "startday": "Sunday",
            "times": {
                "id": 4,
                "workplace_id": 9,
                "sun_start": "18:42",
                "sun_end": "20:42",
                "mon_start": "21:43",
                "mon_end": "12:43",
                "tue_start": null,
                "tue_end": null,
                "wed_start": null,
                "wed_end": null,
                "thu_start": null,
                "thu_end": null,
                "fri_start": null,
                "fri_end": null,
                "sat_start": null,
                "sat_end": null,
                "created_at": "2020-07-22 22:43:14",
                "updated_at": "2020-07-22 22:43:14"
            },
            "admin": {
                "id": 18,
                "name": "ahmed kamal",
                "phone": "0123145687",
                "country_code": 20,
                "email": "ahmed@menuhat.com",
                "email_verified_at": null,
                "created_at": "2020-07-22 22:41:47",
                "updated_at": "2020-07-22 22:41:47",
                "device_token": null,
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 10,
            "admin_id": 19,
            "title": "Trix Studio",
            "created_at": "2020-07-26 21:20:52",
            "updated_at": "2020-07-26 21:20:52",
            "timezone": "Africa\/Cairo",
            "website": "https:\/\/Trix.com",
            "startday": "Monday",
            "times": {
                "id": 5,
                "workplace_id": 10,
                "sun_start": "09:00",
                "sun_end": "18:00",
                "mon_start": null,
                "mon_end": null,
                "tue_start": null,
                "tue_end": null,
                "wed_start": null,
                "wed_end": null,
                "thu_start": null,
                "thu_end": null,
                "fri_start": null,
                "fri_end": null,
                "sat_start": null,
                "sat_end": null,
                "created_at": "2020-07-26 21:20:52",
                "updated_at": "2020-07-26 21:20:52"
            },
            "admin": {
                "id": 19,
                "name": "Sherif Adel",
                "phone": "123456",
                "country_code": 1,
                "email": "sherif@atumstudio.com",
                "email_verified_at": null,
                "created_at": "2020-07-26 21:19:24",
                "updated_at": "2020-07-26 21:47:34",
                "device_token": null,
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 11,
            "admin_id": 21,
            "title": "Kalma",
            "created_at": "2020-08-18 19:01:29",
            "updated_at": "2020-08-18 19:01:29",
            "timezone": "Africa\/Cairo",
            "website": "https:\/\/menuhat.online\/",
            "startday": "Sunday",
            "times": {
                "id": 6,
                "workplace_id": 11,
                "sun_start": "12:00",
                "sun_end": "23:59",
                "mon_start": null,
                "mon_end": null,
                "tue_start": null,
                "tue_end": null,
                "wed_start": null,
                "wed_end": null,
                "thu_start": null,
                "thu_end": null,
                "fri_start": null,
                "fri_end": null,
                "sat_start": null,
                "sat_end": null,
                "created_at": "2020-08-18 19:01:29",
                "updated_at": "2020-08-18 19:01:29"
            },
            "admin": {
                "id": 21,
                "name": "Kamal",
                "phone": "010050512244",
                "country_code": 20,
                "email": "ahmed.kamal@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-08-18 18:59:40",
                "updated_at": "2020-12-28 16:22:23",
                "device_token": null,
                "os": null,
                "is_available": 0
            }
<<<<<<< HEAD
<<<<<<< HEAD
        }
    ]
}

HTTP Request

GET api/all_workplaces

api/all_products

Example request:

curl -X POST \
    "/api/all_products" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/api/all_products"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/all_products

api/all_leads

Example request:

curl -X GET \
    -G "/api/all_leads" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "/api/all_leads"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "code": "0",
    "data": [
        {
            "id": 177,
            "name": "asd",
            "product_id": 4,
            "user_id": 7,
            "source_id": 1,
            "phone": "201324564",
            "email": "ajksbdkljasbd@slnkd.aksbd",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "name",
                    "value": "asd"
                },
                {
                    "key": "email",
                    "value": "ajksbdkljasbd@slnkd.aksbd"
                },
                {
                    "key": "Kind",
                    "value": "asd"
                },
                {
                    "key": "Age",
                    "value": "asd"
                },
                {
                    "key": "phone",
                    "value": "201324564"
                },
                {
                    "key": "source",
                    "value": "test yoga"
                },
                {
                    "key": "product",
                    "value": "Trial Product"
                }
            ],
            "created_at": "2021-01-10 14:16:53",
            "updated_at": "2021-01-10 14:16:53",
            "source": {
                "id": 1,
                "workplace_id": 3,
                "user_id": 9,
                "name": "test yoga",
                "country_id": null,
                "website": "https:\/\/menuhat.online\/",
                "product_id": 5,
                "widget_type": "icon",
                "alignment": "right",
                "primary": "#eba037",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-cellphone-android fa-fw",
                "bubble": "off",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to an expert!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "kind",
                "custom_lable_2": "age",
                "submitt_text": "Call\n            Me Now",
                "created_at": "2020-10-11 10:46:36",
                "updated_at": "2020-10-11 10:46:36"
            },
            "product": {
                "id": 4,
                "workplace_id": 3,
                "title": "Trial Product",
                "created_at": "2020-05-05 12:17:49",
                "updated_at": "2020-05-05 12:17:49"
            },
            "user": {
                "id": 7,
                "name": "mohamed",
                "phone": "201150305357",
                "country_code": 20,
                "email": "mohammed.fathy.abdelrhman@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-05-05 12:16:34",
                "updated_at": "2020-11-05 16:03:04",
                "device_token": "ch3bxqYJQlOblGzs8_U84A:APA91bGXDdsEn4FsQYiuJI7sL_1ktoD7BmUzvpkQXtqtr3NV5TO6zhtXJPB_UEPlAOHnGd9KmA45EVLhhGejZmJWDYg0SFlfPNCTHJ7wA7V1CTec-9W9UST7WwgS4syleL2Jm8vGxKEd",
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 176,
            "name": "Ashraf Kamel",
            "product_id": 13,
            "user_id": 25,
            "source_id": 13,
            "phone": "2001224014675",
            "email": "ashrafkamel@outlook.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "name",
                    "value": "Ashraf Kamel"
                },
                {
                    "key": "email",
                    "value": "ashrafkamel@outlook.com"
                },
                {
                    "key": "Location",
                    "value": "Alexandria"
                },
                {
                    "key": "Quantity",
                    "value": "4"
                },
                {
                    "key": "phone",
                    "value": "2001224014675"
                },
                {
                    "key": "source",
                    "value": "books dev"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2021-01-10 07:24:24",
            "updated_at": "2021-01-10 07:24:24",
            "source": {
                "id": 13,
                "workplace_id": 13,
                "user_id": 25,
                "name": "books dev",
                "country_id": null,
                "website": "https:\/\/books4fund.com\/",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to an expert!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Location",
                "custom_lable_2": "Quantity",
                "submitt_text": "Request Call",
                "created_at": "2021-01-04 12:23:30",
                "updated_at": "2021-01-04 13:14:49"
            },
            "product": {
                "id": 13,
                "workplace_id": 13,
                "title": "General",
                "created_at": "2021-01-04 12:22:39",
                "updated_at": "2021-01-04 12:22:39"
            },
            "user": {
                "id": 25,
                "name": "Mohamed Gaber",
                "phone": "01066912272",
                "country_code": 20,
                "email": "mgaber.dev@gmail.com",
                "email_verified_at": null,
                "created_at": "2021-01-04 12:21:23",
                "updated_at": "2021-01-04 12:47:51",
                "device_token": "fpuDjOCeR9uDq-wWNaFmqw:APA91bGmNrElRFe_U68YMTFwCs7CPz7gkzsw4yw9Cu5omGFK6eKJHGoNxBNJh92-lubdkzPr9gqPAgYZOxHLxAcLUriEpuceuIPKg87JAurbq1CynSxnwvkE_r-wpsBWDZFEUQw-59Fk",
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 175,
            "name": "Ahmed Abdallah",
            "product_id": 13,
            "user_id": 25,
            "source_id": 13,
            "phone": "20+201016789919",
            "email": "egyman1973@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "name",
                    "value": "Ahmed Abdallah"
                },
                {
                    "key": "email",
                    "value": "egyman1973@gmail.com"
                },
                {
                    "key": "Location",
                    "value": "Cairo"
                },
                {
                    "key": "Quantity",
                    "value": "500"
                },
                {
                    "key": "phone",
                    "value": "20+201016789919"
                },
                {
                    "key": "source",
                    "value": "books dev"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2021-01-05 20:59:16",
            "updated_at": "2021-01-05 20:59:16",
            "source": {
                "id": 13,
                "workplace_id": 13,
                "user_id": 25,
                "name": "books dev",
                "country_id": null,
                "website": "https:\/\/books4fund.com\/",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to an expert!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Location",
                "custom_lable_2": "Quantity",
                "submitt_text": "Request Call",
                "created_at": "2021-01-04 12:23:30",
                "updated_at": "2021-01-04 13:14:49"
=======
=======
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
        },
        {
            "id": 12,
            "admin_id": 3,
            "title": "new",
            "created_at": "2020-08-31 02:54:12",
            "updated_at": "2020-08-31 02:54:12",
            "timezone": "Africa\/Cairo",
            "website": "https:\/\/example.com",
            "startday": "Monday",
            "times": {
                "id": 7,
                "workplace_id": 12,
                "sun_start": null,
                "sun_end": null,
                "mon_start": "07:54",
                "mon_end": "19:54",
                "tue_start": null,
                "tue_end": null,
                "wed_start": null,
                "wed_end": null,
                "thu_start": null,
                "thu_end": null,
                "fri_start": null,
                "fri_end": null,
                "sat_start": null,
                "sat_end": null,
                "created_at": "2020-08-31 02:54:12",
                "updated_at": "2020-08-31 02:54:12"
            },
            "admin": {
                "id": 3,
                "name": "ahmed",
                "phone": "1020304050",
                "country_code": null,
                "email": "ahmed.kamal775@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-01-29 04:03:13",
                "updated_at": "2020-01-29 06:33:25",
                "device_token": null,
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 13,
            "admin_id": 23,
            "title": "max",
            "created_at": "2020-09-02 03:04:49",
            "updated_at": "2020-09-02 03:04:49",
            "timezone": "Africa\/Cairo",
            "website": "http:\/\/www.max.com",
            "startday": "Monday",
            "times": {
                "id": 8,
                "workplace_id": 13,
                "sun_start": null,
                "sun_end": null,
                "mon_start": null,
                "mon_end": null,
                "tue_start": null,
                "tue_end": null,
                "wed_start": null,
                "wed_end": null,
                "thu_start": null,
                "thu_end": null,
                "fri_start": null,
                "fri_end": null,
                "sat_start": null,
                "sat_end": null,
                "created_at": "2020-09-02 03:04:49",
                "updated_at": "2020-09-02 03:04:49"
            },
            "admin": {
                "id": 23,
                "name": "tasho",
                "phone": "12345677",
                "country_code": 20,
                "email": "tashosx@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-09-02 03:04:25",
                "updated_at": "2020-09-04 01:08:01",
                "device_token": null,
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 14,
            "admin_id": 26,
            "title": "Ahmed WOrkSpace",
            "created_at": "2020-09-25 04:01:12",
            "updated_at": "2020-09-25 04:01:12",
            "timezone": "Africa\/Cairo",
            "website": null,
            "startday": "Monday",
            "times": {
                "id": 9,
                "workplace_id": 14,
                "sun_start": null,
                "sun_end": null,
                "mon_start": null,
                "mon_end": null,
                "tue_start": null,
                "tue_end": null,
                "wed_start": null,
                "wed_end": null,
                "thu_start": null,
                "thu_end": null,
                "fri_start": null,
                "fri_end": null,
                "sat_start": null,
                "sat_end": null,
                "created_at": "2020-09-25 04:01:12",
                "updated_at": "2020-09-25 04:01:12"
            },
            "admin": {
                "id": 26,
                "name": "AHMED",
                "phone": "01211463283",
                "country_code": 20,
                "email": "ahmed.elsayed@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-09-25 04:00:20",
                "updated_at": "2020-09-25 04:00:20",
                "device_token": null,
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 15,
            "admin_id": 26,
            "title": "Ahmed WOrkSpace",
            "created_at": "2020-09-25 04:01:13",
            "updated_at": "2020-09-25 04:01:13",
            "timezone": "Africa\/Cairo",
            "website": null,
            "startday": "Monday",
            "times": {
                "id": 10,
                "workplace_id": 15,
                "sun_start": null,
                "sun_end": null,
                "mon_start": null,
                "mon_end": null,
                "tue_start": null,
                "tue_end": null,
                "wed_start": null,
                "wed_end": null,
                "thu_start": null,
                "thu_end": null,
                "fri_start": null,
                "fri_end": null,
                "sat_start": null,
                "sat_end": null,
                "created_at": "2020-09-25 04:01:13",
                "updated_at": "2020-09-25 04:01:13"
<<<<<<< HEAD
>>>>>>> d9ccd0d01eda6a99e044b9af8f4a10138814ce2f
=======
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15
            },
            "admin": {
                "id": 26,
                "name": "AHMED",
                "phone": "01211463283",
                "country_code": 20,
                "email": "ahmed.elsayed@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-09-25 04:00:20",
                "updated_at": "2020-09-25 04:00:20",
                "device_token": null,
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 16,
            "admin_id": 29,
            "title": "n",
            "created_at": "2020-10-04 06:07:20",
            "updated_at": "2020-10-04 06:07:20",
            "timezone": "Europe\/Amsterdam",
            "website": null,
            "startday": "Monday",
            "times": {
                "id": 11,
                "workplace_id": 16,
                "sun_start": null,
                "sun_end": null,
                "mon_start": null,
                "mon_end": null,
                "tue_start": null,
                "tue_end": null,
                "wed_start": null,
                "wed_end": null,
                "thu_start": null,
                "thu_end": null,
                "fri_start": null,
                "fri_end": null,
                "sat_start": null,
                "sat_end": null,
                "created_at": "2020-10-04 06:07:20",
                "updated_at": "2020-10-04 06:07:20"
            },
            "admin": {
                "id": 29,
                "name": "n",
                "phone": "01016789911",
                "country_code": 20,
                "email": "egyman1973@gmddail.com",
                "email_verified_at": null,
                "created_at": "2020-10-04 06:03:55",
                "updated_at": "2020-10-04 06:03:55",
                "device_token": null,
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 17,
            "admin_id": 30,
            "title": "Mo Fathy Work Space",
            "created_at": "2020-10-07 01:45:42",
            "updated_at": "2020-10-07 01:45:42",
            "timezone": "Africa\/Cairo",
            "website": "http:\\\\w3schools.com",
            "startday": "Saturday",
            "times": {
                "id": 12,
                "workplace_id": 17,
                "sun_start": "00:00",
                "sun_end": "01:00",
                "mon_start": null,
                "mon_end": null,
                "tue_start": null,
                "tue_end": null,
                "wed_start": null,
                "wed_end": null,
                "thu_start": null,
                "thu_end": null,
                "fri_start": null,
                "fri_end": null,
                "sat_start": null,
                "sat_end": null,
                "created_at": "2020-10-07 01:45:42",
                "updated_at": "2020-10-07 01:45:42"
            },
            "admin": {
                "id": 30,
                "name": "mohamed",
                "phone": "01012312409",
                "country_code": 93,
                "email": "mohammed.fathy.abdelrhman@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-10-07 01:44:11",
                "updated_at": "2020-12-09 02:52:10",
                "device_token": "fAYFhP2DSNiEip9S_trEsM:APA91bHKr9hVbPI_SnMrB2xsehBPXy_mVY0ziPvDzXVAaE9Kt_nAZuzcOyYEkcyq44gCPfY1cIXLPNqIPbeX0J1mNM-uV9RwJPsjo8cNVl5tkIG3YTE-anVACUofiDWC6UT0snh90sH-",
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 18,
            "admin_id": 32,
            "title": "Kotob",
            "created_at": "2020-11-28 19:07:04",
            "updated_at": "2020-11-28 19:07:04",
            "timezone": "Africa\/Cairo",
            "website": "https:\/\/books4fund.com\/",
            "startday": "Sunday",
            "times": {
                "id": 13,
                "workplace_id": 18,
                "sun_start": null,
                "sun_end": null,
                "mon_start": null,
                "mon_end": null,
                "tue_start": null,
                "tue_end": null,
                "wed_start": null,
                "wed_end": null,
                "thu_start": null,
                "thu_end": null,
                "fri_start": null,
                "fri_end": null,
                "sat_start": null,
                "sat_end": null,
                "created_at": "2020-11-28 19:07:04",
                "updated_at": "2020-11-28 19:07:04"
            },
            "admin": {
                "id": 32,
                "name": "Bohsen",
                "phone": "01016789918",
                "country_code": 20,
                "email": "ahmed@books4fund.com",
                "email_verified_at": null,
                "created_at": "2020-11-28 19:06:29",
                "updated_at": "2020-11-28 19:08:27",
                "device_token": "doYFKchDQ86kNKRqRoeW4a:APA91bEThH-qW8kXZYLkQ3pZLAyaDytqc7QnOBIvqBhZDi_oxjxUWiInlLam4Xt6kWbWf53Um-eXL9Eb8ozjSMRO-UPggfka7ehr7L7f4Z200GeIpy707pXknMc39G1ot04n6MTOQOGM",
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 19,
            "admin_id": 2,
            "title": "SpaceX",
            "created_at": "2020-12-21 14:49:23",
            "updated_at": "2020-12-21 14:49:23",
            "timezone": "Africa\/Cairo",
            "website": "http:\/\/www.spacex.com",
            "startday": "Sunday",
            "times": {
                "id": 14,
                "workplace_id": 19,
                "sun_start": "08:00",
                "sun_end": "16:00",
                "mon_start": "08:00",
                "mon_end": "16:00",
                "tue_start": "08:00",
                "tue_end": "16:00",
                "wed_start": "08:00",
                "wed_end": "16:00",
                "thu_start": "08:00",
                "thu_end": "16:00",
                "fri_start": null,
                "fri_end": null,
                "sat_start": null,
                "sat_end": null,
                "created_at": "2020-12-21 14:49:23",
                "updated_at": "2020-12-21 14:49:23"
            },
            "admin": {
                "id": 2,
                "name": "ahmed kamal",
                "phone": "123456789",
                "country_code": null,
                "email": "kamal@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-01-27 13:18:17",
                "updated_at": "2020-12-28 15:23:53",
                "device_token": null,
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 20,
            "admin_id": 2,
            "title": "aa",
            "created_at": "2021-01-10 16:54:23",
            "updated_at": "2021-01-10 16:54:23",
            "timezone": "Africa\/Cairo",
            "website": null,
            "startday": "Monday",
            "times": {
                "id": 15,
                "workplace_id": 20,
                "sun_start": null,
                "sun_end": null,
                "mon_start": null,
                "mon_end": null,
                "tue_start": null,
                "tue_end": null,
                "wed_start": null,
                "wed_end": null,
                "thu_start": null,
                "thu_end": null,
                "fri_start": null,
                "fri_end": null,
                "sat_start": null,
                "sat_end": null,
                "created_at": "2021-01-10 16:54:23",
                "updated_at": "2021-01-10 16:54:23"
            },
            "admin": {
                "id": 2,
                "name": "ahmed kamal",
                "phone": "123456789",
                "country_code": null,
                "email": "kamal@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-01-27 13:18:17",
                "updated_at": "2020-12-28 15:23:53",
                "device_token": null,
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 21,
            "admin_id": 2,
            "title": "a",
            "created_at": "2021-01-10 16:56:08",
            "updated_at": "2021-01-10 16:56:08",
            "timezone": "Pacific\/Midway",
            "website": null,
            "startday": "Monday",
            "times": {
                "id": 16,
                "workplace_id": 21,
                "sun_start": null,
                "sun_end": null,
                "mon_start": null,
                "mon_end": null,
                "tue_start": null,
                "tue_end": null,
                "wed_start": null,
                "wed_end": null,
                "thu_start": null,
                "thu_end": null,
                "fri_start": null,
                "fri_end": null,
                "sat_start": null,
                "sat_end": null,
                "created_at": "2021-01-10 16:56:08",
                "updated_at": "2021-01-10 16:56:08"
            },
            "admin": {
                "id": 2,
                "name": "ahmed kamal",
                "phone": "123456789",
                "country_code": null,
                "email": "kamal@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-01-27 13:18:17",
                "updated_at": "2020-12-28 15:23:53",
                "device_token": null,
                "os": null,
                "is_available": 1
            }
        }
    ]
}

HTTP Request

GET api/all_workplaces

api/all_products

Example request:

curl -X POST \
    "http://localhost/closor/public/api/all_products" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/api/all_products"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/all_products

api/all_leads

Example request:

curl -X GET \
    -G "http://localhost/closor/public/api/all_leads" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/api/all_leads"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "code": "0",
    "data": [
        {
            "id": 86,
            "name": "mahmoud",
            "product_id": 26,
            "user_id": 30,
            "source_id": 12,
            "phone": "2001234567891",
            "email": "mahmoud@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 2,
            "lead": [
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "01234567891"
                },
                {
                    "key": "name",
                    "value": "mahmoud"
                },
                {
                    "key": "email",
                    "value": "mahmoud@gmail.com"
                },
                {
                    "key": "source",
                    "value": "facebook"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-18 21:17:28",
            "updated_at": "2020-12-12 00:31:33",
            "source": {
                "id": 12,
                "workplace_id": 17,
                "user_id": 30,
                "name": "facebook",
                "country_id": null,
                "website": "http:\\\\w3schools.com",
                "product_id": 26,
                "widget_type": "icon",
                "alignment": "right",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to an expert!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email"
                ],
                "custom_lable_1": null,
                "custom_lable_2": null,
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-07 01:46:37",
                "updated_at": "2020-10-07 01:46:37"
            },
            "product": {
                "id": 26,
                "workplace_id": 17,
                "title": "General",
                "created_at": "2020-10-07 01:45:42",
                "updated_at": "2020-10-07 01:45:42"
            },
            "user": {
                "id": 30,
                "name": "mohamed",
                "phone": "01012312409",
                "country_code": 93,
                "email": "mohammed.fathy.abdelrhman@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-10-07 01:44:11",
                "updated_at": "2020-12-09 02:52:10",
                "device_token": "fAYFhP2DSNiEip9S_trEsM:APA91bHKr9hVbPI_SnMrB2xsehBPXy_mVY0ziPvDzXVAaE9Kt_nAZuzcOyYEkcyq44gCPfY1cIXLPNqIPbeX0J1mNM-uV9RwJPsjo8cNVl5tkIG3YTE-anVACUofiDWC6UT0snh90sH-",
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 85,
            "name": "mohamed",
            "product_id": 26,
            "user_id": 30,
            "source_id": 12,
            "phone": "20 01112312312",
            "email": "mohamed@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 1,
            "lead": [
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "01112312312"
                },
                {
                    "key": "name",
                    "value": "mohamed"
                },
                {
                    "key": "email",
                    "value": "mohamed@gmail.com"
                },
                {
                    "key": "source",
                    "value": "facebook"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-18 21:14:23",
            "updated_at": "2020-12-09 01:40:50",
            "source": {
                "id": 12,
                "workplace_id": 17,
                "user_id": 30,
                "name": "facebook",
                "country_id": null,
                "website": "http:\\\\w3schools.com",
                "product_id": 26,
                "widget_type": "icon",
                "alignment": "right",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to an expert!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email"
                ],
                "custom_lable_1": null,
                "custom_lable_2": null,
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-07 01:46:37",
                "updated_at": "2020-10-07 01:46:37"
            },
            "product": {
                "id": 26,
                "workplace_id": 17,
                "title": "General",
                "created_at": "2020-10-07 01:45:42",
                "updated_at": "2020-10-07 01:45:42"
            },
            "user": {
                "id": 30,
                "name": "mohamed",
                "phone": "01012312409",
                "country_code": 93,
                "email": "mohammed.fathy.abdelrhman@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-10-07 01:44:11",
                "updated_at": "2020-12-09 02:52:10",
                "device_token": "fAYFhP2DSNiEip9S_trEsM:APA91bHKr9hVbPI_SnMrB2xsehBPXy_mVY0ziPvDzXVAaE9Kt_nAZuzcOyYEkcyq44gCPfY1cIXLPNqIPbeX0J1mNM-uV9RwJPsjo8cNVl5tkIG3YTE-anVACUofiDWC6UT0snh90sH-",
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 84,
            "name": "mahmoud4",
            "product_id": 9,
            "user_id": 16,
            "source_id": 9,
            "phone": "20 123456",
            "email": "egyman1973@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 2,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "123456"
                },
                {
                    "key": "name",
                    "value": "mahmoud4"
                },
                {
                    "key": "email",
                    "value": "egyman1973@gmail.com"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-03 00:52:45",
            "updated_at": "2020-12-09 01:40:59",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 16,
                "name": "Tamer Ashoor",
                "phone": "01016789919",
                "country_code": null,
                "email": "tadreb.inbox@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-06-21 04:21:41",
                "updated_at": "2020-10-02 22:22:34",
                "device_token": "duDRCpVhQweXCVT07O_TYX:APA91bEz7pM5PNLinhK2SmDxgYoE4UESX86cVXFP-jTRJhxiFKUkAfl8vQAk90cOv2ceCXZNoANzFxbsNsuhv1WSUcDs5g2uOPreSJifE2M4asUqtwXmS-vKWPwEu5Iu9UVZmzFSo1zw",
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 83,
            "name": "mahmoud3",
            "product_id": 9,
            "user_id": 7,
            "source_id": 9,
            "phone": "20 123456",
            "email": "egyman1973@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 1,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "123456"
                },
                {
                    "key": "name",
                    "value": "mahmoud3"
                },
                {
                    "key": "email",
                    "value": "egyman1973@gmail.com"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-03 00:52:22",
            "updated_at": "2020-10-13 22:59:30",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 7,
                "name": "Ahmed El Sayed",
                "phone": "01016789919",
                "country_code": 20,
                "email": "info@ahmedmohsen.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 21:36:19",
                "updated_at": "2020-12-09 01:46:55",
                "device_token": "dmmeB3QTTu2W2a0SWtocAs:APA91bH939MH0oUNORQ7obg7NlMtoreOSQUn39p6LqlzLaGXJ_ZAATtEg9vNAHV27H9Btc4YknrX7NFXLTCKmVq44USjJq3Y34Wi4D9gsjUda6Fdwkymw9YNA2AOYaQXfsNeg-Ma7xqs",
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 82,
            "name": "mahmoud2",
            "product_id": 9,
            "user_id": 16,
            "source_id": 9,
            "phone": "20 0123",
            "email": "egyman1973@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "0123"
                },
                {
                    "key": "name",
                    "value": "mahmoud2"
                },
                {
                    "key": "email",
                    "value": "egyman1973@gmail.com"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-03 00:16:10",
            "updated_at": "2020-10-03 00:16:10",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 16,
                "name": "Tamer Ashoor",
                "phone": "01016789919",
                "country_code": null,
                "email": "tadreb.inbox@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-06-21 04:21:41",
                "updated_at": "2020-10-02 22:22:34",
                "device_token": "duDRCpVhQweXCVT07O_TYX:APA91bEz7pM5PNLinhK2SmDxgYoE4UESX86cVXFP-jTRJhxiFKUkAfl8vQAk90cOv2ceCXZNoANzFxbsNsuhv1WSUcDs5g2uOPreSJifE2M4asUqtwXmS-vKWPwEu5Iu9UVZmzFSo1zw",
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 81,
            "name": "mahmoud",
            "product_id": 9,
            "user_id": 7,
            "source_id": 9,
            "phone": "20 0123",
            "email": "egyman1973@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "0123"
                },
                {
                    "key": "name",
                    "value": "mahmoud"
                },
                {
                    "key": "email",
                    "value": "egyman1973@gmail.com"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-03 00:15:40",
            "updated_at": "2020-10-03 00:15:40",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 7,
                "name": "Ahmed El Sayed",
                "phone": "01016789919",
                "country_code": 20,
                "email": "info@ahmedmohsen.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 21:36:19",
                "updated_at": "2020-12-09 01:46:55",
                "device_token": "dmmeB3QTTu2W2a0SWtocAs:APA91bH939MH0oUNORQ7obg7NlMtoreOSQUn39p6LqlzLaGXJ_ZAATtEg9vNAHV27H9Btc4YknrX7NFXLTCKmVq44USjJq3Y34Wi4D9gsjUda6Fdwkymw9YNA2AOYaQXfsNeg-Ma7xqs",
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 80,
            "name": "Ali",
            "product_id": 9,
            "user_id": 16,
            "source_id": 9,
            "phone": "20 0123",
            "email": "egyman1973@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "0123"
                },
                {
                    "key": "name",
                    "value": "Ali"
                },
                {
                    "key": "email",
                    "value": "egyman1973@gmail.com"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-03 00:15:14",
            "updated_at": "2020-10-03 00:15:14",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 16,
                "name": "Tamer Ashoor",
                "phone": "01016789919",
                "country_code": null,
                "email": "tadreb.inbox@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-06-21 04:21:41",
                "updated_at": "2020-10-02 22:22:34",
                "device_token": "duDRCpVhQweXCVT07O_TYX:APA91bEz7pM5PNLinhK2SmDxgYoE4UESX86cVXFP-jTRJhxiFKUkAfl8vQAk90cOv2ceCXZNoANzFxbsNsuhv1WSUcDs5g2uOPreSJifE2M4asUqtwXmS-vKWPwEu5Iu9UVZmzFSo1zw",
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 79,
            "name": "Ali",
            "product_id": 9,
            "user_id": 7,
            "source_id": 9,
            "phone": "20 123456",
            "email": "egyman1973@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "123456"
                },
                {
                    "key": "name",
                    "value": "Ali"
                },
                {
                    "key": "email",
                    "value": "egyman1973@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "Egypt"
                },
                {
                    "key": "custom2",
                    "value": "tt"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-03 00:14:35",
            "updated_at": "2020-10-03 00:14:35",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 7,
                "name": "Ahmed El Sayed",
                "phone": "01016789919",
                "country_code": 20,
                "email": "info@ahmedmohsen.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 21:36:19",
                "updated_at": "2020-12-09 01:46:55",
                "device_token": "dmmeB3QTTu2W2a0SWtocAs:APA91bH939MH0oUNORQ7obg7NlMtoreOSQUn39p6LqlzLaGXJ_ZAATtEg9vNAHV27H9Btc4YknrX7NFXLTCKmVq44USjJq3Y34Wi4D9gsjUda6Fdwkymw9YNA2AOYaQXfsNeg-Ma7xqs",
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 78,
            "name": "t14",
            "product_id": 9,
            "user_id": 16,
            "source_id": 9,
            "phone": "20 123456",
            "email": "egyman1973@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "123456"
                },
                {
                    "key": "name",
                    "value": "t14"
                },
                {
                    "key": "email",
                    "value": "egyman1973@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "Egypt"
                },
                {
                    "key": "custom2",
                    "value": "tt"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-02 22:23:43",
            "updated_at": "2020-10-02 22:23:43",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 16,
                "name": "Tamer Ashoor",
                "phone": "01016789919",
                "country_code": null,
                "email": "tadreb.inbox@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-06-21 04:21:41",
                "updated_at": "2020-10-02 22:22:34",
                "device_token": "duDRCpVhQweXCVT07O_TYX:APA91bEz7pM5PNLinhK2SmDxgYoE4UESX86cVXFP-jTRJhxiFKUkAfl8vQAk90cOv2ceCXZNoANzFxbsNsuhv1WSUcDs5g2uOPreSJifE2M4asUqtwXmS-vKWPwEu5Iu9UVZmzFSo1zw",
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 77,
            "name": "t13",
            "product_id": 9,
            "user_id": 7,
            "source_id": 9,
            "phone": "20 123456",
            "email": "egyman1973@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "123456"
                },
                {
                    "key": "name",
                    "value": "t13"
                },
                {
                    "key": "email",
                    "value": "egyman1973@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "Egypt"
                },
                {
                    "key": "custom2",
                    "value": "tt"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-02 22:23:26",
            "updated_at": "2020-10-02 22:23:26",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 7,
                "name": "Ahmed El Sayed",
                "phone": "01016789919",
                "country_code": 20,
                "email": "info@ahmedmohsen.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 21:36:19",
                "updated_at": "2020-12-09 01:46:55",
                "device_token": "dmmeB3QTTu2W2a0SWtocAs:APA91bH939MH0oUNORQ7obg7NlMtoreOSQUn39p6LqlzLaGXJ_ZAATtEg9vNAHV27H9Btc4YknrX7NFXLTCKmVq44USjJq3Y34Wi4D9gsjUda6Fdwkymw9YNA2AOYaQXfsNeg-Ma7xqs",
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 76,
            "name": "t12",
            "product_id": 9,
            "user_id": 16,
            "source_id": 9,
            "phone": "20 123456",
            "email": "egyman1973@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "123456"
                },
                {
                    "key": "name",
                    "value": "t12"
                },
                {
                    "key": "email",
                    "value": "egyman1973@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "Egypt"
                },
                {
                    "key": "custom2",
                    "value": "tt"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-02 22:22:41",
            "updated_at": "2020-10-02 22:22:41",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 16,
                "name": "Tamer Ashoor",
                "phone": "01016789919",
                "country_code": null,
                "email": "tadreb.inbox@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-06-21 04:21:41",
                "updated_at": "2020-10-02 22:22:34",
                "device_token": "duDRCpVhQweXCVT07O_TYX:APA91bEz7pM5PNLinhK2SmDxgYoE4UESX86cVXFP-jTRJhxiFKUkAfl8vQAk90cOv2ceCXZNoANzFxbsNsuhv1WSUcDs5g2uOPreSJifE2M4asUqtwXmS-vKWPwEu5Iu9UVZmzFSo1zw",
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 75,
            "name": "t11",
            "product_id": 9,
            "user_id": 7,
            "source_id": 9,
            "phone": "20 123456",
            "email": "egyman1973@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "123456"
                },
                {
                    "key": "name",
                    "value": "t11"
                },
                {
                    "key": "email",
                    "value": "egyman1973@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "Egypt"
                },
                {
                    "key": "custom2",
                    "value": "tt"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-02 22:21:07",
            "updated_at": "2020-10-02 22:21:07",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 7,
                "name": "Ahmed El Sayed",
                "phone": "01016789919",
                "country_code": 20,
                "email": "info@ahmedmohsen.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 21:36:19",
                "updated_at": "2020-12-09 01:46:55",
                "device_token": "dmmeB3QTTu2W2a0SWtocAs:APA91bH939MH0oUNORQ7obg7NlMtoreOSQUn39p6LqlzLaGXJ_ZAATtEg9vNAHV27H9Btc4YknrX7NFXLTCKmVq44USjJq3Y34Wi4D9gsjUda6Fdwkymw9YNA2AOYaQXfsNeg-Ma7xqs",
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 74,
            "name": "t10",
            "product_id": 9,
            "user_id": 16,
            "source_id": 9,
            "phone": "20 123456",
            "email": "egyman1973@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "123456"
                },
                {
                    "key": "name",
                    "value": "t10"
                },
                {
                    "key": "email",
                    "value": "egyman1973@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "Egypt"
                },
                {
                    "key": "custom2",
                    "value": "tt"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-02 22:20:54",
            "updated_at": "2020-10-02 22:20:54",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 16,
                "name": "Tamer Ashoor",
                "phone": "01016789919",
                "country_code": null,
                "email": "tadreb.inbox@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-06-21 04:21:41",
                "updated_at": "2020-10-02 22:22:34",
                "device_token": "duDRCpVhQweXCVT07O_TYX:APA91bEz7pM5PNLinhK2SmDxgYoE4UESX86cVXFP-jTRJhxiFKUkAfl8vQAk90cOv2ceCXZNoANzFxbsNsuhv1WSUcDs5g2uOPreSJifE2M4asUqtwXmS-vKWPwEu5Iu9UVZmzFSo1zw",
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 73,
            "name": "t9",
            "product_id": 9,
            "user_id": 7,
            "source_id": 9,
            "phone": "20 123456",
            "email": "egyman1973@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "123456"
                },
                {
                    "key": "name",
                    "value": "t9"
                },
                {
                    "key": "email",
                    "value": "egyman1973@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "Egypt"
                },
                {
                    "key": "custom2",
                    "value": "tt"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-02 22:20:19",
            "updated_at": "2020-10-02 22:20:19",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 7,
                "name": "Ahmed El Sayed",
                "phone": "01016789919",
                "country_code": 20,
                "email": "info@ahmedmohsen.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 21:36:19",
                "updated_at": "2020-12-09 01:46:55",
                "device_token": "dmmeB3QTTu2W2a0SWtocAs:APA91bH939MH0oUNORQ7obg7NlMtoreOSQUn39p6LqlzLaGXJ_ZAATtEg9vNAHV27H9Btc4YknrX7NFXLTCKmVq44USjJq3Y34Wi4D9gsjUda6Fdwkymw9YNA2AOYaQXfsNeg-Ma7xqs",
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 72,
            "name": "t8",
            "product_id": 9,
            "user_id": 16,
            "source_id": 9,
            "phone": "20 123456",
            "email": "egyman1973@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "123456"
                },
                {
                    "key": "name",
                    "value": "t8"
                },
                {
                    "key": "email",
                    "value": "egyman1973@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "Egypt"
                },
                {
                    "key": "custom2",
                    "value": "tt"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-02 22:19:57",
            "updated_at": "2020-10-02 22:19:57",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 16,
                "name": "Tamer Ashoor",
                "phone": "01016789919",
                "country_code": null,
                "email": "tadreb.inbox@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-06-21 04:21:41",
                "updated_at": "2020-10-02 22:22:34",
                "device_token": "duDRCpVhQweXCVT07O_TYX:APA91bEz7pM5PNLinhK2SmDxgYoE4UESX86cVXFP-jTRJhxiFKUkAfl8vQAk90cOv2ceCXZNoANzFxbsNsuhv1WSUcDs5g2uOPreSJifE2M4asUqtwXmS-vKWPwEu5Iu9UVZmzFSo1zw",
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 71,
            "name": "t7",
            "product_id": 9,
            "user_id": 7,
            "source_id": 9,
            "phone": "20 123456",
            "email": "egyman1973@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "123456"
                },
                {
                    "key": "name",
                    "value": "t7"
                },
                {
                    "key": "email",
                    "value": "egyman1973@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "Egypt"
                },
                {
                    "key": "custom2",
                    "value": "tt"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-02 22:19:23",
            "updated_at": "2020-10-02 22:19:23",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 7,
                "name": "Ahmed El Sayed",
                "phone": "01016789919",
                "country_code": 20,
                "email": "info@ahmedmohsen.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 21:36:19",
                "updated_at": "2020-12-09 01:46:55",
                "device_token": "dmmeB3QTTu2W2a0SWtocAs:APA91bH939MH0oUNORQ7obg7NlMtoreOSQUn39p6LqlzLaGXJ_ZAATtEg9vNAHV27H9Btc4YknrX7NFXLTCKmVq44USjJq3Y34Wi4D9gsjUda6Fdwkymw9YNA2AOYaQXfsNeg-Ma7xqs",
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 70,
            "name": "t6",
            "product_id": 9,
            "user_id": 7,
            "source_id": 9,
            "phone": "20 123456",
            "email": "egyman1973@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "123456"
                },
                {
                    "key": "name",
                    "value": "t6"
                },
                {
                    "key": "email",
                    "value": "egyman1973@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "Egypt"
                },
                {
                    "key": "custom2",
                    "value": "tt"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-02 22:19:09",
            "updated_at": "2020-10-02 22:19:09",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 7,
                "name": "Ahmed El Sayed",
                "phone": "01016789919",
                "country_code": 20,
                "email": "info@ahmedmohsen.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 21:36:19",
                "updated_at": "2020-12-09 01:46:55",
                "device_token": "dmmeB3QTTu2W2a0SWtocAs:APA91bH939MH0oUNORQ7obg7NlMtoreOSQUn39p6LqlzLaGXJ_ZAATtEg9vNAHV27H9Btc4YknrX7NFXLTCKmVq44USjJq3Y34Wi4D9gsjUda6Fdwkymw9YNA2AOYaQXfsNeg-Ma7xqs",
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 69,
            "name": "t5",
            "product_id": 9,
            "user_id": 16,
            "source_id": 9,
            "phone": "20 t5",
            "email": "egyman1973@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "t5"
                },
                {
                    "key": "name",
                    "value": "t5"
                },
                {
                    "key": "email",
                    "value": "egyman1973@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "Egypt"
                },
                {
                    "key": "custom2",
                    "value": "tt"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-02 22:18:37",
            "updated_at": "2020-10-02 22:18:37",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 16,
                "name": "Tamer Ashoor",
                "phone": "01016789919",
                "country_code": null,
                "email": "tadreb.inbox@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-06-21 04:21:41",
                "updated_at": "2020-10-02 22:22:34",
                "device_token": "duDRCpVhQweXCVT07O_TYX:APA91bEz7pM5PNLinhK2SmDxgYoE4UESX86cVXFP-jTRJhxiFKUkAfl8vQAk90cOv2ceCXZNoANzFxbsNsuhv1WSUcDs5g2uOPreSJifE2M4asUqtwXmS-vKWPwEu5Iu9UVZmzFSo1zw",
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 68,
            "name": "t4",
            "product_id": 9,
            "user_id": 16,
            "source_id": 9,
            "phone": "20 t4",
            "email": "egyman1973@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "t4"
                },
                {
                    "key": "name",
                    "value": "t4"
                },
                {
                    "key": "email",
                    "value": "egyman1973@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "Egypt"
                },
                {
                    "key": "custom2",
                    "value": "tt"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-02 22:17:55",
            "updated_at": "2020-10-02 22:17:55",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 16,
                "name": "Tamer Ashoor",
                "phone": "01016789919",
                "country_code": null,
                "email": "tadreb.inbox@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-06-21 04:21:41",
                "updated_at": "2020-10-02 22:22:34",
                "device_token": "duDRCpVhQweXCVT07O_TYX:APA91bEz7pM5PNLinhK2SmDxgYoE4UESX86cVXFP-jTRJhxiFKUkAfl8vQAk90cOv2ceCXZNoANzFxbsNsuhv1WSUcDs5g2uOPreSJifE2M4asUqtwXmS-vKWPwEu5Iu9UVZmzFSo1zw",
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 67,
            "name": "t2",
            "product_id": 9,
            "user_id": 7,
            "source_id": 9,
            "phone": "20 t31",
            "email": "egyman1973@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "t31"
                },
                {
                    "key": "name",
                    "value": "t2"
                },
                {
                    "key": "email",
                    "value": "egyman1973@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "Egypt"
                },
                {
                    "key": "custom2",
                    "value": "tt"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-02 22:17:26",
            "updated_at": "2020-10-02 22:17:26",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 7,
                "name": "Ahmed El Sayed",
                "phone": "01016789919",
                "country_code": 20,
                "email": "info@ahmedmohsen.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 21:36:19",
                "updated_at": "2020-12-09 01:46:55",
                "device_token": "dmmeB3QTTu2W2a0SWtocAs:APA91bH939MH0oUNORQ7obg7NlMtoreOSQUn39p6LqlzLaGXJ_ZAATtEg9vNAHV27H9Btc4YknrX7NFXLTCKmVq44USjJq3Y34Wi4D9gsjUda6Fdwkymw9YNA2AOYaQXfsNeg-Ma7xqs",
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 66,
            "name": "t2",
            "product_id": 9,
            "user_id": 16,
            "source_id": 9,
            "phone": "20 1",
            "email": "egyman1973@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "1"
                },
                {
                    "key": "name",
                    "value": "t2"
                },
                {
                    "key": "email",
                    "value": "egyman1973@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "Egypt"
                },
                {
                    "key": "custom2",
                    "value": "tt"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-02 22:13:10",
            "updated_at": "2020-10-02 22:13:10",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 16,
                "name": "Tamer Ashoor",
                "phone": "01016789919",
                "country_code": null,
                "email": "tadreb.inbox@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-06-21 04:21:41",
                "updated_at": "2020-10-02 22:22:34",
                "device_token": "duDRCpVhQweXCVT07O_TYX:APA91bEz7pM5PNLinhK2SmDxgYoE4UESX86cVXFP-jTRJhxiFKUkAfl8vQAk90cOv2ceCXZNoANzFxbsNsuhv1WSUcDs5g2uOPreSJifE2M4asUqtwXmS-vKWPwEu5Iu9UVZmzFSo1zw",
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 65,
            "name": "t1",
            "product_id": 9,
            "user_id": 7,
            "source_id": 9,
            "phone": "20 01016789919",
            "email": "egyman1973@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "01016789919"
                },
                {
                    "key": "name",
                    "value": "t1"
                },
                {
                    "key": "email",
                    "value": "egyman1973@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "Egypt"
                },
                {
                    "key": "custom2",
                    "value": "tt"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-02 22:12:31",
            "updated_at": "2020-10-02 22:12:31",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 7,
                "name": "Ahmed El Sayed",
                "phone": "01016789919",
                "country_code": 20,
                "email": "info@ahmedmohsen.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 21:36:19",
                "updated_at": "2020-12-09 01:46:55",
                "device_token": "dmmeB3QTTu2W2a0SWtocAs:APA91bH939MH0oUNORQ7obg7NlMtoreOSQUn39p6LqlzLaGXJ_ZAATtEg9vNAHV27H9Btc4YknrX7NFXLTCKmVq44USjJq3Y34Wi4D9gsjUda6Fdwkymw9YNA2AOYaQXfsNeg-Ma7xqs",
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 64,
            "name": "ddd",
            "product_id": 9,
            "user_id": 16,
            "source_id": 9,
            "phone": "20 01016789919",
            "email": "info@ahmedmohsen.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 1,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "01016789919"
                },
                {
                    "key": "name",
                    "value": "ddd"
                },
                {
                    "key": "email",
                    "value": "info@ahmedmohsen.com"
                },
                {
                    "key": "custom1",
                    "value": "Egypt"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-02 22:02:42",
            "updated_at": "2020-12-09 01:42:10",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 16,
                "name": "Tamer Ashoor",
                "phone": "01016789919",
                "country_code": null,
                "email": "tadreb.inbox@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-06-21 04:21:41",
                "updated_at": "2020-10-02 22:22:34",
                "device_token": "duDRCpVhQweXCVT07O_TYX:APA91bEz7pM5PNLinhK2SmDxgYoE4UESX86cVXFP-jTRJhxiFKUkAfl8vQAk90cOv2ceCXZNoANzFxbsNsuhv1WSUcDs5g2uOPreSJifE2M4asUqtwXmS-vKWPwEu5Iu9UVZmzFSo1zw",
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 63,
            "name": "dodo",
            "product_id": 9,
            "user_id": 7,
            "source_id": 9,
            "phone": "20 0123456",
            "email": "dodo@g",
            "scheduled_on": null,
            "last_contact": null,
            "status": 1,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "0123456"
                },
                {
                    "key": "name",
                    "value": "dodo"
                },
                {
                    "key": "email",
                    "value": "dodo@g"
                },
                {
                    "key": "custom1",
                    "value": "KSAA"
                },
                {
                    "key": "custom2",
                    "value": "TKK"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-01 16:50:16",
            "updated_at": "2020-12-09 01:42:12",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 7,
                "name": "Ahmed El Sayed",
                "phone": "01016789919",
                "country_code": 20,
                "email": "info@ahmedmohsen.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 21:36:19",
                "updated_at": "2020-12-09 01:46:55",
                "device_token": "dmmeB3QTTu2W2a0SWtocAs:APA91bH939MH0oUNORQ7obg7NlMtoreOSQUn39p6LqlzLaGXJ_ZAATtEg9vNAHV27H9Btc4YknrX7NFXLTCKmVq44USjJq3Y34Wi4D9gsjUda6Fdwkymw9YNA2AOYaQXfsNeg-Ma7xqs",
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 62,
            "name": "Mido",
            "product_id": 9,
            "user_id": 16,
            "source_id": 9,
            "phone": "20 01111111111",
            "email": "mido@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 1,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "01111111111"
                },
                {
                    "key": "name",
                    "value": "Mido"
                },
                {
                    "key": "email",
                    "value": "mido@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "zimbabwi"
                },
                {
                    "key": "custom2",
                    "value": "Manager"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-01 16:46:30",
            "updated_at": "2020-10-02 21:59:07",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 16,
                "name": "Tamer Ashoor",
                "phone": "01016789919",
                "country_code": null,
                "email": "tadreb.inbox@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-06-21 04:21:41",
                "updated_at": "2020-10-02 22:22:34",
                "device_token": "duDRCpVhQweXCVT07O_TYX:APA91bEz7pM5PNLinhK2SmDxgYoE4UESX86cVXFP-jTRJhxiFKUkAfl8vQAk90cOv2ceCXZNoANzFxbsNsuhv1WSUcDs5g2uOPreSJifE2M4asUqtwXmS-vKWPwEu5Iu9UVZmzFSo1zw",
                "os": null,
                "is_available": 1
            }
        },
        {
            "id": 61,
            "name": "Ahmed Abdallah",
            "product_id": 9,
            "user_id": 7,
            "source_id": 9,
            "phone": "20 01016789919",
            "email": "egyman1973@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "01016789919"
                },
                {
                    "key": "name",
                    "value": "Ahmed Abdallah"
                },
                {
                    "key": "email",
                    "value": "egyman1973@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "Egypt"
                },
                {
                    "key": "custom2",
                    "value": "CEO"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "General"
                }
            ],
            "created_at": "2020-10-01 16:43:01",
            "updated_at": "2020-10-01 16:43:01",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 9,
                "workplace_id": 8,
                "title": "General",
                "created_at": "2020-06-21 04:15:55",
                "updated_at": "2020-06-21 04:15:55"
            },
            "user": {
                "id": 7,
                "name": "Ahmed El Sayed",
                "phone": "01016789919",
                "country_code": 20,
                "email": "info@ahmedmohsen.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 21:36:19",
                "updated_at": "2020-12-09 01:46:55",
                "device_token": "dmmeB3QTTu2W2a0SWtocAs:APA91bH939MH0oUNORQ7obg7NlMtoreOSQUn39p6LqlzLaGXJ_ZAATtEg9vNAHV27H9Btc4YknrX7NFXLTCKmVq44USjJq3Y34Wi4D9gsjUda6Fdwkymw9YNA2AOYaQXfsNeg-Ma7xqs",
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 60,
            "name": "Ahmed Abdallah",
            "product_id": 13,
            "user_id": 24,
            "source_id": 5,
            "phone": " 0123456",
            "email": "g@e.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "phone",
                    "value": "0123456"
                },
                {
                    "key": "name",
                    "value": "Ahmed Abdallah"
                },
                {
                    "key": "email",
                    "value": "g@e.com"
                },
                {
                    "key": "custom1",
                    "value": "j"
                },
                {
                    "key": "custom2",
                    "value": "a"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-10-01 06:47:58",
            "updated_at": "2020-10-01 06:47:58",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 24,
                "name": "Taha",
                "phone": "01234567890",
                "country_code": null,
                "email": "taha@malexs.com",
                "email_verified_at": null,
                "created_at": "2020-09-20 23:47:59",
                "updated_at": "2020-09-22 20:45:00",
                "device_token": "wwddwfwff45f44",
                "os": "android",
                "is_available": 1
            }
        },
        {
            "id": 59,
            "name": "Mohamed Ismaiel",
            "product_id": 13,
            "user_id": 25,
            "source_id": 5,
            "phone": " 1010101",
            "email": "mohamedismaiel12224@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "phone",
                    "value": "1010101"
                },
                {
                    "key": "name",
                    "value": "Mohamed Ismaiel"
                },
                {
                    "key": "email",
                    "value": "mohamedismaiel12224@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "wwwwww"
                },
                {
                    "key": "custom2",
                    "value": "22"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-22 21:25:57",
            "updated_at": "2020-09-22 21:25:57",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 25,
                "name": "ezzat",
                "phone": "01234567890",
                "country_code": null,
                "email": "ezzat@malexs.com",
                "email_verified_at": null,
                "created_at": "2020-09-20 23:48:23",
                "updated_at": "2020-09-22 20:45:25",
                "device_token": "wwddwfwff45f44",
                "os": "android",
                "is_available": 1
            }
        },
        {
            "id": 58,
            "name": "wrr",
            "product_id": 13,
            "user_id": 24,
            "source_id": 6,
            "phone": " 0808040",
            "email": "fe@ef.ss",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "phone",
                    "value": "0808040"
                },
                {
                    "key": "name",
                    "value": "wrr"
                },
                {
                    "key": "email",
                    "value": "fe@ef.ss"
                },
                {
                    "key": "custom1",
                    "value": "454040545"
                },
                {
                    "key": "source",
                    "value": "test 2"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-22 21:21:13",
            "updated_at": "2020-09-22 21:21:13",
            "source": {
                "id": 6,
                "workplace_id": 2,
                "user_id": 1,
                "name": "test 2",
                "country_id": 1,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "icon",
                "alignment": "left",
                "primary": "#3475a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to an expert!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1"
                ],
                "custom_lable_1": "phone",
                "custom_lable_2": null,
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:56:13",
                "updated_at": "2020-08-18 21:56:13"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 24,
                "name": "Taha",
                "phone": "01234567890",
                "country_code": null,
                "email": "taha@malexs.com",
                "email_verified_at": null,
                "created_at": "2020-09-20 23:47:59",
                "updated_at": "2020-09-22 20:45:00",
                "device_token": "wwddwfwff45f44",
                "os": "android",
                "is_available": 1
            }
        },
        {
            "id": 57,
            "name": "eeeewww",
            "product_id": 13,
            "user_id": 8,
            "source_id": 5,
            "phone": " 343252t4",
            "email": "eer@err.er",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "phone",
                    "value": "343252t4"
                },
                {
                    "key": "name",
                    "value": "eeeewww"
                },
                {
                    "key": "email",
                    "value": "eer@err.er"
                },
                {
                    "key": "custom1",
                    "value": "sdfkfs"
                },
                {
                    "key": "custom2",
                    "value": "48"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-22 20:57:06",
            "updated_at": "2020-09-22 20:57:06",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 8,
                "name": "mohamedfathybasha",
                "phone": "01234567890",
                "country_code": null,
                "email": "mohamedfathybasha@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 14:28:08",
                "updated_at": "2020-09-22 20:48:11",
                "device_token": "wwddfefejng6dwfwff45f44",
                "os": "android",
                "is_available": 1
            }
        },
        {
            "id": 56,
            "name": "ee",
            "product_id": 13,
            "user_id": 1,
            "source_id": 5,
            "phone": " djfewk",
            "email": "efew@fdew.fwe",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "phone",
                    "value": "djfewk"
                },
                {
                    "key": "name",
                    "value": "ee"
                },
                {
                    "key": "email",
                    "value": "efew@fdew.fwe"
                },
                {
                    "key": "custom1",
                    "value": "12345"
                },
                {
                    "key": "custom2",
                    "value": "40"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-22 20:51:30",
            "updated_at": "2020-09-22 20:51:30",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 1,
                "name": "kareem",
                "phone": "01234567890",
                "country_code": null,
                "email": "a7medkamal775@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-01-26 16:26:56",
                "updated_at": "2021-01-07 14:07:05",
                "device_token": null,
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 55,
            "name": "jfjfjfj",
            "product_id": 13,
            "user_id": 25,
            "source_id": 5,
            "phone": " 444949",
            "email": "fjfj@jff.ff",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "phone",
                    "value": "444949"
                },
                {
                    "key": "name",
                    "value": "jfjfjfj"
                },
                {
                    "key": "email",
                    "value": "fjfj@jff.ff"
                },
                {
                    "key": "custom1",
                    "value": "4555"
                },
                {
                    "key": "custom2",
                    "value": "23"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-22 20:49:01",
            "updated_at": "2020-09-22 20:49:01",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 25,
                "name": "ezzat",
                "phone": "01234567890",
                "country_code": null,
                "email": "ezzat@malexs.com",
                "email_verified_at": null,
                "created_at": "2020-09-20 23:48:23",
                "updated_at": "2020-09-22 20:45:25",
                "device_token": "wwddwfwff45f44",
                "os": "android",
                "is_available": 1
            }
        },
        {
            "id": 54,
            "name": "Mohamed Ismaiel",
            "product_id": 13,
            "user_id": 24,
            "source_id": 5,
            "phone": " 1010101",
            "email": "mohamedismaiel12224@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "phone",
                    "value": "1010101"
                },
                {
                    "key": "name",
                    "value": "Mohamed Ismaiel"
                },
                {
                    "key": "email",
                    "value": "mohamedismaiel12224@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "dfstg"
                },
                {
                    "key": "custom2",
                    "value": "55"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-22 20:40:33",
            "updated_at": "2020-09-22 20:40:33",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 24,
                "name": "Taha",
                "phone": "01234567890",
                "country_code": null,
                "email": "taha@malexs.com",
                "email_verified_at": null,
                "created_at": "2020-09-20 23:47:59",
                "updated_at": "2020-09-22 20:45:00",
                "device_token": "wwddwfwff45f44",
                "os": "android",
                "is_available": 1
            }
        },
        {
            "id": 53,
            "name": null,
            "product_id": 13,
            "user_id": 8,
            "source_id": 5,
            "phone": " 3333333",
            "email": null,
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "3333333"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-21 21:37:11",
            "updated_at": "2020-09-21 21:37:11",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 8,
                "name": "mohamedfathybasha",
                "phone": "01234567890",
                "country_code": null,
                "email": "mohamedfathybasha@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 14:28:08",
                "updated_at": "2020-09-22 20:48:11",
                "device_token": "wwddfefejng6dwfwff45f44",
                "os": "android",
                "is_available": 1
            }
        },
        {
            "id": 52,
            "name": null,
            "product_id": 13,
            "user_id": 1,
            "source_id": 5,
            "phone": " 345465",
            "email": null,
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "345465"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-21 21:33:29",
            "updated_at": "2020-09-21 21:33:29",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 1,
                "name": "kareem",
                "phone": "01234567890",
                "country_code": null,
                "email": "a7medkamal775@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-01-26 16:26:56",
                "updated_at": "2021-01-07 14:07:05",
                "device_token": null,
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 51,
            "name": null,
            "product_id": 13,
            "user_id": 25,
            "source_id": 5,
            "phone": " 8888888888",
            "email": null,
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "8888888888"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-21 21:30:08",
            "updated_at": "2020-09-21 21:30:08",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 25,
                "name": "ezzat",
                "phone": "01234567890",
                "country_code": null,
                "email": "ezzat@malexs.com",
                "email_verified_at": null,
                "created_at": "2020-09-20 23:48:23",
                "updated_at": "2020-09-22 20:45:25",
                "device_token": "wwddwfwff45f44",
                "os": "android",
                "is_available": 1
            }
        },
        {
            "id": 50,
            "name": null,
            "product_id": 13,
            "user_id": 24,
            "source_id": 5,
            "phone": " 0101010",
            "email": null,
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "0101010"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-21 21:28:11",
            "updated_at": "2020-09-21 21:28:11",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 24,
                "name": "Taha",
                "phone": "01234567890",
                "country_code": null,
                "email": "taha@malexs.com",
                "email_verified_at": null,
                "created_at": "2020-09-20 23:47:59",
                "updated_at": "2020-09-22 20:45:00",
                "device_token": "wwddwfwff45f44",
                "os": "android",
                "is_available": 1
            }
        },
        {
            "id": 49,
            "name": "momo",
            "product_id": 13,
            "user_id": 8,
            "source_id": 5,
            "phone": " 04804840",
            "email": "mo@mo.momo",
            "scheduled_on": null,
            "last_contact": null,
            "status": 1,
            "lead": [
                {
                    "key": "phone",
                    "value": "04804840"
                },
                {
                    "key": "name",
                    "value": "momo"
                },
                {
                    "key": "email",
                    "value": "mo@mo.momo"
                },
                {
                    "key": "custom1",
                    "value": "sdfsbr"
                },
                {
                    "key": "custom2",
                    "value": "55"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-21 21:18:43",
            "updated_at": "2020-12-09 01:46:24",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 8,
                "name": "mohamedfathybasha",
                "phone": "01234567890",
                "country_code": null,
                "email": "mohamedfathybasha@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 14:28:08",
                "updated_at": "2020-09-22 20:48:11",
                "device_token": "wwddfefejng6dwfwff45f44",
                "os": "android",
                "is_available": 1
            }
        },
        {
            "id": 48,
            "name": "moomo",
            "product_id": 13,
            "user_id": 1,
            "source_id": 5,
            "phone": " 01011",
            "email": "mo@mom.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "01011"
                },
                {
                    "key": "name",
                    "value": "moomo"
                },
                {
                    "key": "email",
                    "value": "mo@mom.com"
                },
                {
                    "key": "custom1",
                    "value": "sdgfngfn"
                },
                {
                    "key": "custom2",
                    "value": "25"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-21 21:16:51",
            "updated_at": "2020-09-21 21:16:51",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 1,
                "name": "kareem",
                "phone": "01234567890",
                "country_code": null,
                "email": "a7medkamal775@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-01-26 16:26:56",
                "updated_at": "2021-01-07 14:07:05",
                "device_token": null,
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 47,
            "name": "kikikiki",
            "product_id": 13,
            "user_id": 25,
            "source_id": 5,
            "phone": " 0404044",
            "email": "iki@dfg.jhgv",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "0404044"
                },
                {
                    "key": "name",
                    "value": "kikikiki"
                },
                {
                    "key": "email",
                    "value": "iki@dfg.jhgv"
                },
                {
                    "key": "custom1",
                    "value": "web developer"
                },
                {
                    "key": "custom2",
                    "value": "23"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-21 20:22:24",
            "updated_at": "2020-09-21 20:22:24",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 25,
                "name": "ezzat",
                "phone": "01234567890",
                "country_code": null,
                "email": "ezzat@malexs.com",
                "email_verified_at": null,
                "created_at": "2020-09-20 23:48:23",
                "updated_at": "2020-09-22 20:45:25",
                "device_token": "wwddwfwff45f44",
                "os": "android",
                "is_available": 1
            }
        },
        {
            "id": 46,
            "name": "ali",
            "product_id": 13,
            "user_id": 24,
            "source_id": 5,
            "phone": " 01128266333",
            "email": "m7moodali88@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "01128266333"
                },
                {
                    "key": "name",
                    "value": "ali"
                },
                {
                    "key": "email",
                    "value": "m7moodali88@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "xxxxx"
                },
                {
                    "key": "custom2",
                    "value": "222"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-21 03:28:15",
            "updated_at": "2020-09-21 03:28:15",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 24,
                "name": "Taha",
                "phone": "01234567890",
                "country_code": null,
                "email": "taha@malexs.com",
                "email_verified_at": null,
                "created_at": "2020-09-20 23:47:59",
                "updated_at": "2020-09-22 20:45:00",
                "device_token": "wwddwfwff45f44",
                "os": "android",
                "is_available": 1
            }
        },
        {
            "id": 45,
            "name": "ali",
            "product_id": 13,
            "user_id": 8,
            "source_id": 5,
            "phone": " 01128266333",
            "email": "m7moodali88@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "01128266333"
                },
                {
                    "key": "name",
                    "value": "ali"
                },
                {
                    "key": "email",
                    "value": "m7moodali88@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "xxxxx"
                },
                {
                    "key": "custom2",
                    "value": "222"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-21 03:27:57",
            "updated_at": "2020-09-21 03:27:57",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 8,
                "name": "mohamedfathybasha",
                "phone": "01234567890",
                "country_code": null,
                "email": "mohamedfathybasha@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 14:28:08",
                "updated_at": "2020-09-22 20:48:11",
                "device_token": "wwddfefejng6dwfwff45f44",
                "os": "android",
                "is_available": 1
            }
        },
        {
            "id": 44,
            "name": "ali",
            "product_id": 13,
            "user_id": 1,
            "source_id": 5,
            "phone": " 01128266333",
            "email": "m7moodali88@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "01128266333"
                },
                {
                    "key": "name",
                    "value": "ali"
                },
                {
                    "key": "email",
                    "value": "m7moodali88@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "xxxxx"
                },
                {
                    "key": "custom2",
                    "value": "222"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-21 03:23:29",
            "updated_at": "2020-09-21 03:23:29",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 1,
                "name": "kareem",
                "phone": "01234567890",
                "country_code": null,
                "email": "a7medkamal775@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-01-26 16:26:56",
                "updated_at": "2021-01-07 14:07:05",
                "device_token": null,
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 43,
            "name": "ali",
            "product_id": 13,
            "user_id": 25,
            "source_id": 5,
            "phone": " 0112832999",
            "email": "m7moodali88@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "0112832999"
                },
                {
                    "key": "name",
                    "value": "ali"
                },
                {
                    "key": "email",
                    "value": "m7moodali88@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "cccc"
                },
                {
                    "key": "custom2",
                    "value": "222"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-21 03:22:56",
            "updated_at": "2020-09-21 03:22:56",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 25,
                "name": "ezzat",
                "phone": "01234567890",
                "country_code": null,
                "email": "ezzat@malexs.com",
                "email_verified_at": null,
                "created_at": "2020-09-20 23:48:23",
                "updated_at": "2020-09-22 20:45:25",
                "device_token": "wwddwfwff45f44",
                "os": "android",
                "is_available": 1
            }
        },
        {
            "id": 42,
            "name": "ali",
            "product_id": 13,
            "user_id": 24,
            "source_id": 5,
            "phone": " 0112832999",
            "email": "m7moodali88@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "0112832999"
                },
                {
                    "key": "name",
                    "value": "ali"
                },
                {
                    "key": "email",
                    "value": "m7moodali88@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "go"
                },
                {
                    "key": "custom2",
                    "value": "222"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-21 03:22:03",
            "updated_at": "2020-09-21 03:22:03",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 24,
                "name": "Taha",
                "phone": "01234567890",
                "country_code": null,
                "email": "taha@malexs.com",
                "email_verified_at": null,
                "created_at": "2020-09-20 23:47:59",
                "updated_at": "2020-09-22 20:45:00",
                "device_token": "wwddwfwff45f44",
                "os": "android",
                "is_available": 1
            }
        },
        {
            "id": 41,
            "name": "costa",
            "product_id": 13,
            "user_id": 25,
            "source_id": 5,
            "phone": " 033330000",
            "email": "m7moodali88@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "033330000"
                },
                {
                    "key": "name",
                    "value": "costa"
                },
                {
                    "key": "email",
                    "value": "m7moodali88@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "go"
                },
                {
                    "key": "custom2",
                    "value": "222"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-21 03:20:10",
            "updated_at": "2020-09-21 03:20:10",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 25,
                "name": "ezzat",
                "phone": "01234567890",
                "country_code": null,
                "email": "ezzat@malexs.com",
                "email_verified_at": null,
                "created_at": "2020-09-20 23:48:23",
                "updated_at": "2020-09-22 20:45:25",
                "device_token": "wwddwfwff45f44",
                "os": "android",
                "is_available": 1
            }
        },
        {
            "id": 40,
            "name": "mahmoud ali mohamed",
            "product_id": 13,
            "user_id": 24,
            "source_id": 5,
            "phone": " 033331777",
            "email": "m7moodali88@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "033331777"
                },
                {
                    "key": "name",
                    "value": "mahmoud ali mohamed"
                },
                {
                    "key": "email",
                    "value": "m7moodali88@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "go"
                },
                {
                    "key": "custom2",
                    "value": "222"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-21 03:14:53",
            "updated_at": "2020-09-21 03:14:53",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 24,
                "name": "Taha",
                "phone": "01234567890",
                "country_code": null,
                "email": "taha@malexs.com",
                "email_verified_at": null,
                "created_at": "2020-09-20 23:47:59",
                "updated_at": "2020-09-22 20:45:00",
                "device_token": "wwddwfwff45f44",
                "os": "android",
                "is_available": 1
            }
        },
        {
            "id": 39,
            "name": "mahmoud ali mohamed",
            "product_id": 13,
            "user_id": 25,
            "source_id": 5,
            "phone": " 033331998",
            "email": "m7moodali88@yahoo.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "033331998"
                },
                {
                    "key": "name",
                    "value": "mahmoud ali mohamed"
                },
                {
                    "key": "email",
                    "value": "m7moodali88@yahoo.com"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-20 23:57:25",
            "updated_at": "2020-09-20 23:57:25",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 25,
                "name": "ezzat",
                "phone": "01234567890",
                "country_code": null,
                "email": "ezzat@malexs.com",
                "email_verified_at": null,
                "created_at": "2020-09-20 23:48:23",
                "updated_at": "2020-09-22 20:45:25",
                "device_token": "wwddwfwff45f44",
                "os": "android",
                "is_available": 1
            }
        },
        {
            "id": 38,
            "name": "Momomo",
            "product_id": 13,
            "user_id": 24,
            "source_id": 5,
            "phone": " 0128070505",
            "email": "mm@mm.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "0128070505"
                },
                {
                    "key": "name",
                    "value": "Momomo"
                },
                {
                    "key": "email",
                    "value": "mm@mm.com"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-20 23:54:24",
            "updated_at": "2020-09-20 23:54:24",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 24,
                "name": "Taha",
                "phone": "01234567890",
                "country_code": null,
                "email": "taha@malexs.com",
                "email_verified_at": null,
                "created_at": "2020-09-20 23:47:59",
                "updated_at": "2020-09-22 20:45:00",
                "device_token": "wwddwfwff45f44",
                "os": "android",
                "is_available": 1
            }
        },
        {
            "id": 37,
            "name": "mahmoud ali mohamed",
            "product_id": 0,
            "user_id": 8,
            "source_id": 5,
            "phone": " 033331998",
            "email": "m7moodali88@yahoo.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "033331998"
                },
                {
                    "key": "name",
                    "value": "mahmoud ali mohamed"
                },
                {
                    "key": "email",
                    "value": "m7moodali88@yahoo.com"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                }
            ],
            "created_at": "2020-09-20 23:39:43",
            "updated_at": "2020-09-20 23:39:43",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": null,
            "user": {
                "id": 8,
                "name": "mohamedfathybasha",
                "phone": "01234567890",
                "country_code": null,
                "email": "mohamedfathybasha@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 14:28:08",
                "updated_at": "2020-09-22 20:48:11",
                "device_token": "wwddfefejng6dwfwff45f44",
                "os": "android",
                "is_available": 1
            }
        },
        {
            "id": 36,
            "name": "mahmoud ali mohamed",
            "product_id": 0,
            "user_id": 1,
            "source_id": 5,
            "phone": " 033331998",
            "email": "m7moodali88@yahoo.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "033331998"
                },
                {
                    "key": "name",
                    "value": "mahmoud ali mohamed"
                },
                {
                    "key": "email",
                    "value": "m7moodali88@yahoo.com"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                }
            ],
            "created_at": "2020-09-20 23:39:31",
            "updated_at": "2020-09-20 23:39:31",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": null,
            "user": {
                "id": 1,
                "name": "kareem",
                "phone": "01234567890",
                "country_code": null,
                "email": "a7medkamal775@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-01-26 16:26:56",
                "updated_at": "2021-01-07 14:07:05",
                "device_token": null,
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 35,
            "name": "mohamed yehia",
            "product_id": 0,
            "user_id": 1,
            "source_id": 5,
            "phone": " 01010110",
            "email": "m.ali@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "01010110"
                },
                {
                    "key": "name",
                    "value": "mohamed yehia"
                },
                {
                    "key": "email",
                    "value": "m.ali@gmail.com"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                }
            ],
            "created_at": "2020-09-20 22:28:12",
            "updated_at": "2020-09-20 22:28:12",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": null,
            "user": {
                "id": 1,
                "name": "kareem",
                "phone": "01234567890",
                "country_code": null,
                "email": "a7medkamal775@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-01-26 16:26:56",
                "updated_at": "2021-01-07 14:07:05",
                "device_token": null,
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 34,
            "name": "mohamed yassien",
            "product_id": 0,
            "user_id": 8,
            "source_id": 5,
            "phone": " 01010110",
            "email": "m.ali@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "01010110"
                },
                {
                    "key": "name",
                    "value": "mohamed yassien"
                },
                {
                    "key": "email",
                    "value": "m.ali@gmail.com"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                }
            ],
            "created_at": "2020-09-20 22:27:46",
            "updated_at": "2020-09-20 22:27:46",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": null,
            "user": {
                "id": 8,
                "name": "mohamedfathybasha",
                "phone": "01234567890",
                "country_code": null,
                "email": "mohamedfathybasha@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 14:28:08",
                "updated_at": "2020-09-22 20:48:11",
                "device_token": "wwddfefejng6dwfwff45f44",
                "os": "android",
                "is_available": 1
            }
        },
        {
            "id": 33,
            "name": "mohamed fathy",
            "product_id": 0,
            "user_id": 8,
            "source_id": 5,
            "phone": " 01010110",
            "email": "m.ali@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 1,
            "lead": [
                {
                    "key": "phone",
                    "value": "01010110"
                },
                {
                    "key": "name",
                    "value": "mohamed fathy"
                },
                {
                    "key": "email",
                    "value": "m.ali@gmail.com"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                }
            ],
            "created_at": "2020-09-20 22:27:21",
            "updated_at": "2020-10-13 23:02:10",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": null,
            "user": {
                "id": 8,
                "name": "mohamedfathybasha",
                "phone": "01234567890",
                "country_code": null,
                "email": "mohamedfathybasha@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-02-03 14:28:08",
                "updated_at": "2020-09-22 20:48:11",
                "device_token": "wwddfefejng6dwfwff45f44",
                "os": "android",
                "is_available": 1
            }
        },
        {
            "id": 32,
            "name": "mohamed ali",
            "product_id": 0,
            "user_id": 1,
            "source_id": 5,
            "phone": " 01010110",
            "email": "m.ali@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "01010110"
                },
                {
                    "key": "name",
                    "value": "mohamed ali"
                },
                {
                    "key": "email",
                    "value": "m.ali@gmail.com"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                }
            ],
            "created_at": "2020-09-20 22:26:40",
            "updated_at": "2020-09-20 22:26:40",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": null,
            "user": {
                "id": 1,
                "name": "kareem",
                "phone": "01234567890",
                "country_code": null,
                "email": "a7medkamal775@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-01-26 16:26:56",
                "updated_at": "2021-01-07 14:07:05",
                "device_token": null,
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 31,
            "name": "Mohamed ismaiel",
            "product_id": 0,
            "user_id": null,
            "source_id": 5,
            "phone": " +201128077568",
            "email": "mohamedismaiel12224@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "+201128077568"
                },
                {
                    "key": "name",
                    "value": "Mohamed ismaiel"
                },
                {
                    "key": "email",
                    "value": "mohamedismaiel12224@gmail.com"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                }
            ],
            "created_at": "2020-09-20 21:35:32",
            "updated_at": "2020-09-20 21:35:32",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": null,
            "user": null
        },
        {
            "id": 30,
            "name": "mahmoud ali mohamed",
            "product_id": 0,
            "user_id": null,
            "source_id": 5,
            "phone": " 033331997",
            "email": "m7moodali88@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 2,
            "lead": [
                {
                    "key": "phone",
                    "value": "033331997"
                },
                {
                    "key": "name",
                    "value": "mahmoud ali mohamed"
                },
                {
                    "key": "email",
                    "value": "m7moodali88@gmail.com"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                }
            ],
            "created_at": "2020-09-20 21:33:39",
            "updated_at": "2020-09-28 21:26:31",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": null,
            "user": null
        },
        {
            "id": 29,
            "name": "kareem222",
            "product_id": 6,
            "user_id": null,
            "source_id": 9,
            "phone": "1234567654",
            "email": null,
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "name",
                    "value": "kareem222"
                },
                {
                    "key": "phone",
                    "value": 1234567654
                },
                {
                    "key": "mobile",
                    "value": 22345678987654
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Product test"
                }
            ],
            "created_at": "2020-09-20 07:07:11",
            "updated_at": "2020-09-20 07:07:11",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 6,
                "workplace_id": 6,
                "title": "Product test",
                "created_at": "2020-02-20 04:40:06",
                "updated_at": "2020-02-20 04:40:06"
            },
            "user": null
        },
        {
            "id": 28,
            "name": "kareem222",
            "product_id": 6,
            "user_id": null,
            "source_id": 9,
            "phone": "1234567654",
            "email": null,
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "name",
                    "value": "kareem222"
                },
                {
                    "key": "phone",
                    "value": 1234567654
                },
                {
                    "key": "mobile",
                    "value": 22345678987654
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Product test"
                }
            ],
            "created_at": "2020-09-19 07:07:47",
            "updated_at": "2020-09-19 07:07:47",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 6,
                "workplace_id": 6,
                "title": "Product test",
                "created_at": "2020-02-20 04:40:06",
                "updated_at": "2020-02-20 04:40:06"
            },
            "user": null
        },
        {
            "id": 27,
            "name": "kareem222",
            "product_id": 6,
            "user_id": null,
            "source_id": 9,
            "phone": "1234567654",
            "email": null,
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "name",
                    "value": "kareem222"
                },
                {
                    "key": "phone",
                    "value": 1234567654
                },
                {
                    "key": "mobile",
                    "value": 22345678987654
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Product test"
                }
            ],
            "created_at": "2020-09-18 07:07:46",
            "updated_at": "2020-09-18 07:07:46",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 6,
                "workplace_id": 6,
                "title": "Product test",
                "created_at": "2020-02-20 04:40:06",
                "updated_at": "2020-02-20 04:40:06"
            },
            "user": null
        },
        {
            "id": 26,
            "name": "kareem222",
            "product_id": 6,
            "user_id": null,
            "source_id": 9,
            "phone": "1234567654",
            "email": null,
            "scheduled_on": null,
            "last_contact": null,
            "status": 1,
            "lead": [
                {
                    "key": "name",
                    "value": "kareem222"
                },
                {
                    "key": "phone",
                    "value": 1234567654
                },
                {
                    "key": "mobile",
                    "value": 22345678987654
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Product test"
                }
            ],
            "created_at": "2020-09-17 21:57:00",
            "updated_at": "2020-09-28 07:51:10",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 6,
                "workplace_id": 6,
                "title": "Product test",
                "created_at": "2020-02-20 04:40:06",
                "updated_at": "2020-02-20 04:40:06"
            },
            "user": null
        },
        {
            "id": 25,
            "name": "kareem222",
            "product_id": 6,
            "user_id": null,
            "source_id": 9,
            "phone": "1234567654",
            "email": null,
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "name",
                    "value": "kareem222"
                },
                {
                    "key": "phone",
                    "value": 1234567654
                },
                {
                    "key": "mobile",
                    "value": 22345678987654
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Product test"
                }
            ],
            "created_at": "2020-09-17 21:53:31",
            "updated_at": "2020-09-17 21:53:31",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 6,
                "workplace_id": 6,
                "title": "Product test",
                "created_at": "2020-02-20 04:40:06",
                "updated_at": "2020-02-20 04:40:06"
            },
            "user": null
        },
        {
            "id": 24,
            "name": "kareem222",
            "product_id": 6,
            "user_id": null,
            "source_id": 9,
            "phone": "1234567654",
            "email": null,
            "scheduled_on": null,
            "last_contact": null,
            "status": 2,
            "lead": [
                {
                    "key": "name",
                    "value": "kareem222"
                },
                {
                    "key": "phone",
                    "value": 1234567654
                },
                {
                    "key": "mobile",
                    "value": 22345678987654
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Product test"
                }
            ],
            "created_at": "2020-09-17 00:07:52",
            "updated_at": "2020-09-26 02:05:40",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 6,
                "workplace_id": 6,
                "title": "Product test",
                "created_at": "2020-02-20 04:40:06",
                "updated_at": "2020-02-20 04:40:06"
            },
            "user": null
        },
        {
            "id": 23,
            "name": "kareem",
            "product_id": 5,
            "user_id": null,
            "source_id": 9,
            "phone": " 1033677562",
            "email": "kareem@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 1,
            "lead": [
                {
                    "key": "phone",
                    "value": "1033677562"
                },
                {
                    "key": "name",
                    "value": "kareem"
                },
                {
                    "key": "email",
                    "value": "kareem@gmail.com"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "test k"
                }
            ],
            "created_at": "2020-09-15 02:12:57",
            "updated_at": "2020-09-28 07:56:11",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 5,
                "workplace_id": 5,
                "title": "test k",
                "created_at": "2020-02-17 22:26:20",
                "updated_at": "2020-02-17 22:26:20"
            },
            "user": null
        },
        {
            "id": 22,
            "name": "kareem",
            "product_id": 5,
            "user_id": null,
            "source_id": 9,
            "phone": " 1033677562",
            "email": "kareem@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "1033677562"
                },
                {
                    "key": "name",
                    "value": "kareem"
                },
                {
                    "key": "email",
                    "value": "kareem@gmail.com"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "test k"
                }
            ],
            "created_at": "2020-09-15 02:12:57",
            "updated_at": "2020-09-15 02:12:57",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 5,
                "workplace_id": 5,
                "title": "test k",
                "created_at": "2020-02-17 22:26:20",
                "updated_at": "2020-02-17 22:26:20"
            },
            "user": null
        },
        {
            "id": 21,
            "name": "kareem",
            "product_id": 5,
            "user_id": null,
            "source_id": 9,
            "phone": " 1033677562",
            "email": "kareem@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "1033677562"
                },
                {
                    "key": "name",
                    "value": "kareem"
                },
                {
                    "key": "email",
                    "value": "kareem@gmail.com"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "test k"
                }
            ],
            "created_at": "2020-09-15 02:12:57",
            "updated_at": "2020-09-15 02:12:57",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 5,
                "workplace_id": 5,
                "title": "test k",
                "created_at": "2020-02-17 22:26:20",
                "updated_at": "2020-02-17 22:26:20"
            },
            "user": null
        },
        {
            "id": 20,
            "name": "kareem",
            "product_id": 5,
            "user_id": null,
            "source_id": 9,
            "phone": " 1033677562",
            "email": "kareem@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "1033677562"
                },
                {
                    "key": "name",
                    "value": "kareem"
                },
                {
                    "key": "email",
                    "value": "kareem@gmail.com"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "test k"
                }
            ],
            "created_at": "2020-09-15 02:12:50",
            "updated_at": "2020-09-15 02:12:50",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 5,
                "workplace_id": 5,
                "title": "test k",
                "created_at": "2020-02-17 22:26:20",
                "updated_at": "2020-02-17 22:26:20"
            },
            "user": null
        },
        {
            "id": 19,
            "name": "mahmoud ali mohamed",
            "product_id": 5,
            "user_id": null,
            "source_id": 9,
            "phone": " 01128321285",
            "email": "m7moodali88@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 2,
            "lead": [
                {
                    "key": "phone",
                    "value": "01128321285"
                },
                {
                    "key": "name",
                    "value": "mahmoud ali mohamed"
                },
                {
                    "key": "email",
                    "value": "m7moodali88@gmail.com"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "test k"
                }
            ],
            "created_at": "2020-09-14 19:59:57",
            "updated_at": "2020-09-26 02:29:15",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 5,
                "workplace_id": 5,
                "title": "test k",
                "created_at": "2020-02-17 22:26:20",
                "updated_at": "2020-02-17 22:26:20"
            },
            "user": null
        },
        {
            "id": 18,
            "name": "asd",
            "product_id": 7,
            "user_id": null,
            "source_id": 9,
            "phone": "20 1324564",
            "email": "ajksbdkljasbd@slnkd.aksbd",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "1324564"
                },
                {
                    "key": "name",
                    "value": "asd"
                },
                {
                    "key": "email",
                    "value": "ajksbdkljasbd@slnkd.aksbd"
                },
                {
                    "key": "custom1",
                    "value": "Leave your Message"
                },
                {
                    "key": "custom2",
                    "value": "we will back to you"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Corporate Registration Services"
                }
            ],
            "created_at": "2020-09-14 03:44:33",
            "updated_at": "2020-09-14 03:44:33",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 7,
                "workplace_id": 1,
                "title": "Corporate Registration Services",
                "created_at": "2020-02-23 05:45:42",
                "updated_at": "2020-02-23 05:45:42"
            },
            "user": null
        },
        {
            "id": 17,
            "name": "asd",
            "product_id": 7,
            "user_id": null,
            "source_id": 9,
            "phone": "1324564",
            "email": "ajksbdkljasbd@slnkd.aksbd",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "csrftoken",
                    "value": "aw9cr5EdZoYyFPi9RJitOSIEdJOxrZ9tSLY6w6ko"
                },
                {
                    "key": "country_code",
                    "value": "20"
                },
                {
                    "key": "phone",
                    "value": "1324564"
                },
                {
                    "key": "name",
                    "value": "asd"
                },
                {
                    "key": "email",
                    "value": "ajksbdkljasbd@slnkd.aksbd"
                },
                {
                    "key": "custom1",
                    "value": "asdas"
                },
                {
                    "key": "custom2",
                    "value": "asdd"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Corporate Registration Services"
                }
            ],
            "created_at": "2020-09-14 03:39:13",
            "updated_at": "2020-09-14 03:39:13",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 7,
                "workplace_id": 1,
                "title": "Corporate Registration Services",
                "created_at": "2020-02-23 05:45:42",
                "updated_at": "2020-02-23 05:45:42"
            },
            "user": null
        },
        {
            "id": 16,
            "name": "Abu Yazeed",
            "product_id": 7,
            "user_id": null,
            "source_id": 9,
            "phone": "01016789919",
            "email": null,
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "name",
                    "value": "Abu Yazeed"
                },
                {
                    "key": "email",
                    "value": "info@ahmedmohsen.com"
                },
                {
                    "key": "phone",
                    "value": "01016789919"
                },
                {
                    "key": "address",
                    "value": "5 Hefny Nasif, From Kornish, Sidi Gaber"
                },
                {
                    "key": "city",
                    "value": "Alexandria"
                },
                {
                    "key": "social",
                    "value": "1"
                },
                {
                    "key": "occupation",
                    "value": "1"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Corporate Registration Services"
                }
            ],
            "created_at": "2020-02-26 00:07:35",
            "updated_at": "2020-02-26 00:07:35",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 7,
                "workplace_id": 1,
                "title": "Corporate Registration Services",
                "created_at": "2020-02-23 05:45:42",
                "updated_at": "2020-02-23 05:45:42"
            },
            "user": null
        },
        {
            "id": 15,
            "name": "Abu Yazeed",
            "product_id": 7,
            "user_id": null,
            "source_id": 9,
            "phone": "01016789919",
            "email": null,
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "name",
                    "value": "Abu Yazeed"
                },
                {
                    "key": "email",
                    "value": "info@ahmedmohsen.com"
                },
                {
                    "key": "phone",
                    "value": "01016789919"
                },
                {
                    "key": "address",
                    "value": "5 Hefny Nasif, From Kornish, Sidi Gaber"
                },
                {
                    "key": "city",
                    "value": "Alexandria"
                },
                {
                    "key": "social",
                    "value": "1"
                },
                {
                    "key": "occupation",
                    "value": "1"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Corporate Registration Services"
                }
            ],
            "created_at": "2020-02-26 00:07:33",
            "updated_at": "2020-02-26 00:07:33",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 7,
                "workplace_id": 1,
                "title": "Corporate Registration Services",
                "created_at": "2020-02-23 05:45:42",
                "updated_at": "2020-02-23 05:45:42"
            },
            "user": null
        },
        {
            "id": 14,
            "name": "fofo",
            "product_id": 7,
            "user_id": null,
            "source_id": 9,
            "phone": "123456",
            "email": null,
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "name",
                    "value": "fofo"
                },
                {
                    "key": "email",
                    "value": "hanafy@gmail.com"
                },
                {
                    "key": "phone",
                    "value": "123456"
                },
                {
                    "key": "address",
                    "value": "1"
                },
                {
                    "key": "city",
                    "value": "1"
                },
                {
                    "key": "social",
                    "value": "1"
                },
                {
                    "key": "occupation",
                    "value": "1"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Corporate Registration Services"
                }
            ],
            "created_at": "2020-02-25 00:11:25",
            "updated_at": "2020-02-25 00:11:25",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 7,
                "workplace_id": 1,
                "title": "Corporate Registration Services",
                "created_at": "2020-02-23 05:45:42",
                "updated_at": "2020-02-23 05:45:42"
            },
            "user": null
        },
        {
            "id": 13,
            "name": "dada",
            "product_id": 7,
            "user_id": null,
            "source_id": 9,
            "phone": "123456",
            "email": null,
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "name",
                    "value": "dada"
                },
                {
                    "key": "email",
                    "value": "hanafy@gmail.com"
                },
                {
                    "key": "phone",
                    "value": "123456"
                },
                {
                    "key": "address",
                    "value": "1"
                },
                {
                    "key": "city",
                    "value": "1"
                },
                {
                    "key": "social",
                    "value": "1"
                },
                {
                    "key": "occupation",
                    "value": "1"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Corporate Registration Services"
                }
            ],
            "created_at": "2020-02-25 00:11:20",
            "updated_at": "2020-02-25 00:11:20",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 7,
                "workplace_id": 1,
                "title": "Corporate Registration Services",
                "created_at": "2020-02-23 05:45:42",
                "updated_at": "2020-02-23 05:45:42"
            },
            "user": null
        },
        {
            "id": 12,
            "name": "dada",
            "product_id": 7,
            "user_id": null,
            "source_id": 9,
            "phone": "123456",
            "email": null,
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "name",
                    "value": "dada"
                },
                {
                    "key": "email",
                    "value": "hanafy@gmail.com"
                },
                {
                    "key": "phone",
                    "value": "123456"
                },
                {
                    "key": "address",
                    "value": "1"
                },
                {
                    "key": "city",
                    "value": "1"
                },
                {
                    "key": "social",
                    "value": "1"
                },
                {
                    "key": "occupation",
                    "value": "1"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Corporate Registration Services"
                }
            ],
            "created_at": "2020-02-25 00:10:48",
            "updated_at": "2020-02-25 00:10:48",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 7,
                "workplace_id": 1,
                "title": "Corporate Registration Services",
                "created_at": "2020-02-23 05:45:42",
                "updated_at": "2020-02-23 05:45:42"
            },
            "user": null
        },
        {
            "id": 11,
            "name": "dada",
            "product_id": 7,
            "user_id": null,
            "source_id": 9,
            "phone": "123456",
            "email": null,
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "name",
                    "value": "dada"
                },
                {
                    "key": "email",
                    "value": "hanafy@gmail.com"
                },
                {
                    "key": "phone",
                    "value": "123456"
                },
                {
                    "key": "address",
                    "value": "1"
                },
                {
                    "key": "city",
                    "value": "1"
                },
                {
                    "key": "social",
                    "value": "1"
                },
                {
                    "key": "occupation",
                    "value": "1"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Corporate Registration Services"
                }
            ],
            "created_at": "2020-02-25 00:10:47",
            "updated_at": "2020-02-25 00:10:47",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 7,
                "workplace_id": 1,
                "title": "Corporate Registration Services",
                "created_at": "2020-02-23 05:45:42",
                "updated_at": "2020-02-23 05:45:42"
            },
            "user": null
        },
        {
            "id": 10,
            "name": "dada",
            "product_id": 7,
            "user_id": null,
            "source_id": 9,
            "phone": "123456",
            "email": null,
            "scheduled_on": null,
            "last_contact": null,
            "status": 1,
            "lead": [
                {
                    "key": "name",
                    "value": "dada"
                },
                {
                    "key": "email",
                    "value": "hanafy@gmail.com"
                },
                {
                    "key": "phone",
                    "value": "123456"
                },
                {
                    "key": "address",
                    "value": "1"
                },
                {
                    "key": "city",
                    "value": "1"
                },
                {
                    "key": "social",
                    "value": "1"
                },
                {
                    "key": "occupation",
                    "value": "1"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Corporate Registration Services"
                }
            ],
            "created_at": "2020-02-25 00:10:21",
            "updated_at": "2020-09-26 02:27:19",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 7,
                "workplace_id": 1,
                "title": "Corporate Registration Services",
                "created_at": "2020-02-23 05:45:42",
                "updated_at": "2020-02-23 05:45:42"
            },
            "user": null
        },
        {
            "id": 9,
            "name": "midooo",
            "product_id": 7,
            "user_id": null,
            "source_id": 9,
            "phone": "123456",
            "email": null,
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "name",
                    "value": "midooo"
                },
                {
                    "key": "email",
                    "value": "hanafy@gmail.com"
                },
                {
                    "key": "phone",
                    "value": "123456"
                },
                {
                    "key": "address",
                    "value": "1"
                },
                {
                    "key": "city",
                    "value": "1"
                },
                {
                    "key": "social",
                    "value": "1"
                },
                {
                    "key": "occupation",
                    "value": "1"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Corporate Registration Services"
                }
            ],
            "created_at": "2020-02-25 00:07:44",
            "updated_at": "2020-02-25 00:07:44",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 7,
                "workplace_id": 1,
                "title": "Corporate Registration Services",
                "created_at": "2020-02-23 05:45:42",
                "updated_at": "2020-02-23 05:45:42"
            },
            "user": null
        },
        {
            "id": 8,
            "name": "midooo",
            "product_id": 7,
            "user_id": null,
            "source_id": 9,
            "phone": "123456",
            "email": null,
            "scheduled_on": null,
            "last_contact": null,
            "status": 2,
            "lead": [
                {
                    "key": "name",
                    "value": "midooo"
                },
                {
                    "key": "email",
                    "value": "hanafy@gmail.com"
                },
                {
                    "key": "phone",
                    "value": "123456"
                },
                {
                    "key": "address",
                    "value": "1"
                },
                {
                    "key": "city",
                    "value": "1"
                },
                {
                    "key": "social",
                    "value": "1"
                },
                {
                    "key": "occupation",
                    "value": "1"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Corporate Registration Services"
                }
            ],
            "created_at": "2020-02-25 00:07:39",
            "updated_at": "2020-09-25 06:18:02",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 7,
                "workplace_id": 1,
                "title": "Corporate Registration Services",
                "created_at": "2020-02-23 05:45:42",
                "updated_at": "2020-02-23 05:45:42"
            },
            "user": null
        },
        {
            "id": 7,
            "name": "midooo",
            "product_id": 7,
            "user_id": null,
            "source_id": 9,
            "phone": "123456",
            "email": null,
            "scheduled_on": null,
            "last_contact": null,
            "status": 2,
            "lead": [
                {
                    "key": "name",
                    "value": "midooo"
                },
                {
                    "key": "email",
                    "value": "hanafy@gmail.com"
                },
                {
                    "key": "phone",
                    "value": "123456"
                },
                {
                    "key": "address",
                    "value": null
                },
                {
                    "key": "city",
                    "value": null
                },
                {
                    "key": "social",
                    "value": null
                },
                {
                    "key": "occupation",
                    "value": null
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Corporate Registration Services"
                }
            ],
            "created_at": "2020-02-25 00:07:29",
            "updated_at": "2020-09-28 07:56:03",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 7,
                "workplace_id": 1,
                "title": "Corporate Registration Services",
                "created_at": "2020-02-23 05:45:42",
                "updated_at": "2020-02-23 05:45:42"
            },
            "user": null
        },
        {
            "id": 6,
            "name": "kareemTest2",
            "product_id": 6,
            "user_id": null,
            "source_id": 9,
            "phone": "0123987662",
            "email": "kareemkima@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 1,
            "lead": [
                {
                    "key": "name",
                    "value": "kareemTest2"
                },
                {
                    "key": "email",
                    "value": "kareemkima@gmail.com"
                },
                {
                    "key": "phone",
                    "value": "0123987662"
                },
                {
                    "key": "address",
                    "value": "miami"
                },
                {
                    "key": "city",
                    "value": "alexandria"
                },
                {
                    "key": "social",
                    "value": "http:\/\/facebook.com"
                },
                {
                    "key": "occupation",
                    "value": "Manager"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Product test"
                }
            ],
            "created_at": "2020-02-23 04:38:11",
            "updated_at": "2020-09-24 20:12:40",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 6,
                "workplace_id": 6,
                "title": "Product test",
                "created_at": "2020-02-20 04:40:06",
                "updated_at": "2020-02-20 04:40:06"
            },
            "user": null
        },
        {
            "id": 5,
            "name": "kareemTest2",
            "product_id": 6,
            "user_id": null,
            "source_id": 9,
            "phone": "0123987662",
            "email": "kareemkima@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 2,
            "lead": [
                {
                    "key": "name",
                    "value": "kareemTest2"
                },
                {
                    "key": "email",
                    "value": "kareemkima@gmail.com"
                },
                {
                    "key": "phone",
                    "value": "0123987662"
                },
                {
                    "key": "address",
                    "value": "miami"
                },
                {
                    "key": "city",
                    "value": "alexandria"
                },
                {
                    "key": "social",
                    "value": "http:\/\/facebook.com"
                },
                {
                    "key": "occupation",
                    "value": "Manager"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Product test"
                }
            ],
            "created_at": "2020-02-23 04:38:02",
            "updated_at": "2020-09-24 20:12:28",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 6,
                "workplace_id": 6,
                "title": "Product test",
                "created_at": "2020-02-20 04:40:06",
                "updated_at": "2020-02-20 04:40:06"
            },
            "user": null
        },
        {
            "id": 4,
            "name": "kareemTest2",
            "product_id": 6,
            "user_id": null,
            "source_id": 9,
            "phone": "0123987662",
            "email": "kareemkima@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 1,
            "lead": [
                {
                    "key": "name",
                    "value": "kareemTest2"
                },
                {
                    "key": "email",
                    "value": "kareemkima@gmail.com"
                },
                {
                    "key": "phone",
                    "value": "0123987662"
                },
                {
                    "key": "address",
                    "value": "miami"
                },
                {
                    "key": "city",
                    "value": "alexandria"
                },
                {
                    "key": "social",
                    "value": "http:\/\/facebook.com"
                },
                {
                    "key": "occupation",
                    "value": "Manager"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Product test"
                }
            ],
            "created_at": "2020-02-23 04:37:58",
            "updated_at": "2020-09-28 17:15:20",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 6,
                "workplace_id": 6,
                "title": "Product test",
                "created_at": "2020-02-20 04:40:06",
                "updated_at": "2020-02-20 04:40:06"
            },
            "user": null
        },
        {
            "id": 3,
            "name": "kareemTest",
            "product_id": 2,
            "user_id": null,
            "source_id": 9,
            "phone": "0123987662",
            "email": "kareemkima@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 2,
            "lead": [
                {
                    "key": "name",
                    "value": "kareemTest"
                },
                {
                    "key": "email",
                    "value": "kareemkima@gmail.com"
                },
                {
                    "key": "phone",
                    "value": "0123987662"
                },
                {
                    "key": "address",
                    "value": "miami"
                },
                {
                    "key": "city",
                    "value": "alexandria"
                },
                {
                    "key": "social",
                    "value": "http:\/\/facebook.com"
                },
                {
                    "key": "occupation",
                    "value": "Manager"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "vola p2"
                }
            ],
            "created_at": "2020-02-23 04:36:55",
            "updated_at": "2020-09-26 02:27:14",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 2,
                "workplace_id": 4,
                "title": "vola p2",
                "created_at": "2020-02-16 17:17:53",
                "updated_at": "2020-02-16 17:17:53"
            },
            "user": null
        },
        {
            "id": 2,
            "name": "kareem222",
            "product_id": 6,
            "user_id": null,
            "source_id": 9,
            "phone": "1234567654",
            "email": "kareemkima@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 1,
            "lead": [
                {
                    "key": "name",
                    "value": "kareem222"
                },
                {
                    "key": "phone",
                    "value": "1234567654"
                },
                {
                    "key": "mobile",
                    "value": "22345678987654"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Product test"
                }
            ],
            "created_at": "2020-02-23 04:10:47",
            "updated_at": "2020-09-28 07:51:38",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 6,
                "workplace_id": 6,
                "title": "Product test",
                "created_at": "2020-02-20 04:40:06",
                "updated_at": "2020-02-20 04:40:06"
            },
            "user": null
        },
        {
            "id": 1,
            "name": "kareem222",
            "product_id": 6,
            "user_id": null,
            "source_id": 9,
            "phone": "1234567654",
            "email": "kareemkima@gmail.com\r\n",
            "scheduled_on": null,
            "last_contact": null,
            "status": 2,
            "lead": [
                {
                    "key": "name",
                    "value": "kareem222"
                },
                {
                    "key": "phone",
                    "value": "1234567654"
                },
                {
                    "key": "mobile",
                    "value": "22345678987654"
                },
                {
                    "key": "source",
                    "value": "Bottels Website Form"
                },
                {
                    "key": "product",
                    "value": "Product test"
                }
            ],
            "created_at": "2020-02-23 04:10:22",
            "updated_at": "2020-10-01 07:07:08",
            "source": {
                "id": 9,
                "workplace_id": 8,
                "user_id": 7,
                "name": "Bottels Website Form",
                "country_id": null,
                "website": "https:\/\/popcorn.com",
                "product_id": 11,
                "widget_type": "text",
                "alignment": "left",
                "primary": "#34a853",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-phone fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "Talk to sales expert now!",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "Country",
                "custom_lable_2": "Job Title",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-10-01 16:42:32",
                "updated_at": "2020-10-01 16:42:32"
            },
            "product": {
                "id": 6,
                "workplace_id": 6,
                "title": "Product test",
                "created_at": "2020-02-20 04:40:06",
                "updated_at": "2020-02-20 04:40:06"
            },
            "user": null
        }
    ]
}

HTTP Request

GET api/all_leads

api/user_leads/{user}

Example request:

curl -X GET \
    -G "http://localhost/closor/public/api/user_leads/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/api/user_leads/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "code": "0",
    "data": [
        {
            "id": 56,
            "name": "ee",
            "product_id": 13,
            "user_id": 1,
            "source_id": 5,
            "phone": " djfewk",
            "email": "efew@fdew.fwe",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "baseUrl",
                    "value": "https:\/\/malexs.net\/closor\/public"
                },
                {
                    "key": "phone",
                    "value": "djfewk"
                },
                {
                    "key": "name",
                    "value": "ee"
                },
                {
                    "key": "email",
                    "value": "efew@fdew.fwe"
                },
                {
                    "key": "custom1",
                    "value": "12345"
                },
                {
                    "key": "custom2",
                    "value": "40"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-22 20:51:30",
            "updated_at": "2020-09-22 20:51:30",
            "created_at_time_zone": "2020-09-22T18:51:30.000000Z",
            "created_at_human": "3 months ago",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 1,
                "name": "kareem",
                "phone": "01234567890",
                "country_code": null,
                "email": "a7medkamal775@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-01-26 16:26:56",
                "updated_at": "2021-01-07 14:07:05",
                "device_token": null,
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 52,
            "name": null,
            "product_id": 13,
            "user_id": 1,
            "source_id": 5,
            "phone": " 345465",
            "email": null,
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "345465"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-21 21:33:29",
            "updated_at": "2020-09-21 21:33:29",
            "created_at_time_zone": "2020-09-21T19:33:29.000000Z",
            "created_at_human": "3 months ago",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 1,
                "name": "kareem",
                "phone": "01234567890",
                "country_code": null,
                "email": "a7medkamal775@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-01-26 16:26:56",
                "updated_at": "2021-01-07 14:07:05",
                "device_token": null,
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 48,
            "name": "moomo",
            "product_id": 13,
            "user_id": 1,
            "source_id": 5,
            "phone": " 01011",
            "email": "mo@mom.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "01011"
                },
                {
                    "key": "name",
                    "value": "moomo"
                },
                {
                    "key": "email",
                    "value": "mo@mom.com"
                },
                {
                    "key": "custom1",
                    "value": "sdgfngfn"
                },
                {
                    "key": "custom2",
                    "value": "25"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-21 21:16:51",
            "updated_at": "2020-09-21 21:16:51",
            "created_at_time_zone": "2020-09-21T19:16:51.000000Z",
            "created_at_human": "3 months ago",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 1,
                "name": "kareem",
                "phone": "01234567890",
                "country_code": null,
                "email": "a7medkamal775@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-01-26 16:26:56",
                "updated_at": "2021-01-07 14:07:05",
                "device_token": null,
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 44,
            "name": "ali",
            "product_id": 13,
            "user_id": 1,
            "source_id": 5,
            "phone": " 01128266333",
            "email": "m7moodali88@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "01128266333"
                },
                {
                    "key": "name",
                    "value": "ali"
                },
                {
                    "key": "email",
                    "value": "m7moodali88@gmail.com"
                },
                {
                    "key": "custom1",
                    "value": "xxxxx"
                },
                {
                    "key": "custom2",
                    "value": "222"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                },
                {
                    "key": "product",
                    "value": "English course"
                }
            ],
            "created_at": "2020-09-21 03:23:29",
            "updated_at": "2020-09-21 03:23:29",
            "created_at_time_zone": "2020-09-21T01:23:29.000000Z",
            "created_at_human": "3 months ago",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": {
                "id": 13,
                "workplace_id": 2,
                "title": "English course",
                "created_at": "2020-06-26 01:19:53",
                "updated_at": "2020-06-26 01:19:53"
            },
            "user": {
                "id": 1,
                "name": "kareem",
                "phone": "01234567890",
                "country_code": null,
                "email": "a7medkamal775@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-01-26 16:26:56",
                "updated_at": "2021-01-07 14:07:05",
                "device_token": null,
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 36,
            "name": "mahmoud ali mohamed",
            "product_id": 0,
            "user_id": 1,
            "source_id": 5,
            "phone": " 033331998",
            "email": "m7moodali88@yahoo.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "033331998"
                },
                {
                    "key": "name",
                    "value": "mahmoud ali mohamed"
                },
                {
                    "key": "email",
                    "value": "m7moodali88@yahoo.com"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                }
            ],
            "created_at": "2020-09-20 23:39:31",
            "updated_at": "2020-09-20 23:39:31",
            "created_at_time_zone": "2020-09-20T21:39:31.000000Z",
            "created_at_human": "3 months ago",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": null,
            "user": {
                "id": 1,
                "name": "kareem",
                "phone": "01234567890",
                "country_code": null,
                "email": "a7medkamal775@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-01-26 16:26:56",
                "updated_at": "2021-01-07 14:07:05",
                "device_token": null,
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 35,
            "name": "mohamed yehia",
            "product_id": 0,
            "user_id": 1,
            "source_id": 5,
            "phone": " 01010110",
            "email": "m.ali@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "01010110"
                },
                {
                    "key": "name",
                    "value": "mohamed yehia"
                },
                {
                    "key": "email",
                    "value": "m.ali@gmail.com"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                }
            ],
            "created_at": "2020-09-20 22:28:12",
            "updated_at": "2020-09-20 22:28:12",
            "created_at_time_zone": "2020-09-20T20:28:12.000000Z",
            "created_at_human": "3 months ago",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": null,
            "user": {
                "id": 1,
                "name": "kareem",
                "phone": "01234567890",
                "country_code": null,
                "email": "a7medkamal775@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-01-26 16:26:56",
                "updated_at": "2021-01-07 14:07:05",
                "device_token": null,
                "os": null,
                "is_available": 0
            }
        },
        {
            "id": 32,
            "name": "mohamed ali",
            "product_id": 0,
            "user_id": 1,
            "source_id": 5,
            "phone": " 01010110",
            "email": "m.ali@gmail.com",
            "scheduled_on": null,
            "last_contact": null,
            "status": 0,
            "lead": [
                {
                    "key": "phone",
                    "value": "01010110"
                },
                {
                    "key": "name",
                    "value": "mohamed ali"
                },
                {
                    "key": "email",
                    "value": "m.ali@gmail.com"
                },
                {
                    "key": "source",
                    "value": "Test widget"
                }
            ],
            "created_at": "2020-09-20 22:26:40",
            "updated_at": "2020-09-20 22:26:40",
            "created_at_time_zone": "2020-09-20T20:26:40.000000Z",
            "created_at_human": "3 months ago",
            "source": {
                "id": 5,
                "workplace_id": 2,
                "user_id": 1,
                "name": "Test widget",
                "country_id": 3,
                "website": "http:\\\\w3schools.com",
                "product_id": 13,
                "widget_type": "text",
                "alignment": "right",
                "primary": "#8934a8",
                "secondary": "#ffffff",
                "icon_type": "mdi mdi-headset fa-fw",
                "bubble": "on",
                "bubble_line_1": "Want to talk to an expert?",
                "bubble_line_2": "Our Team is 60 Second Away From You!",
                "bubble_bg_color": "#959a9e",
                "bubble_text_color": "#ffffff",
                "text_text": "ssdsdsd",
                "text_round": 10,
                "fields": [
                    "name",
                    "email",
                    "custom1",
                    "custom2"
                ],
                "custom_lable_1": "fdfffdf",
                "custom_lable_2": "weeweewe",
                "submitt_text": "Call\r\n            Me Now",
                "created_at": "2020-08-18 21:37:25",
                "updated_at": "2020-10-06 22:49:52"
            },
            "product": null,
            "user": {
                "id": 1,
                "name": "kareem",
                "phone": "01234567890",
                "country_code": null,
                "email": "a7medkamal775@gmail.com",
                "email_verified_at": null,
                "created_at": "2020-01-26 16:26:56",
                "updated_at": "2021-01-07 14:07:05",
                "device_token": null,
                "os": null,
                "is_available": 0
            }
        }
    ]
}

HTTP Request

GET api/user_leads/{user}

api/qualified

Example request:

curl -X POST \
    "http://localhost/closor/public/api/qualified" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/api/qualified"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/qualified

api/test_notification_user

Example request:

curl -X POST \
    "http://localhost/closor/public/api/test_notification_user" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/api/test_notification_user"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/test_notification_user

api/test_notification_device

Example request:

curl -X POST \
    "http://localhost/closor/public/api/test_notification_device" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/api/test_notification_device"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/test_notification_device

Admin Login management

Route for Login Admin & Moderator

admin-login

Example request:

curl -X GET \
    -G "http://localhost/closor/public/admin-login" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/admin-login"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

null

HTTP Request

GET admin-login

admin.login

Example request:

curl -X POST \
    "http://localhost/closor/public/admin.login" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/admin.login"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST admin.login

Login management

Route for Login Users

Show the application's login form.

Example request:

curl -X GET \
    -G "http://localhost/closor/public/login" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/login"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

null

HTTP Request

GET login

Handle a login request to the application.

Example request:

curl -X POST \
    "http://localhost/closor/public/login" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/login"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST login

Log the user out of the application.

Example request:

curl -X POST \
    "http://localhost/closor/public/logout" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/logout"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST logout

Create a new controller instance.

Example request:

curl -X GET \
    -G "http://localhost/closor/public/first" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/first"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (302):

null

HTTP Request

GET first

POST first

PUT first

PATCH first

DELETE first

OPTIONS first

Register management

Route for Register Users

Show the application registration form.

Example request:

curl -X GET \
    -G "http://localhost/closor/public/register" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/register"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

null

HTTP Request

GET register

Create a new user instance after a valid registration.

Example request:

curl -X POST \
    "http://localhost/closor/public/register" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/register"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST register

login2

Example request:

curl -X GET \
    -G "http://localhost/closor/public/login2" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/login2"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

GET login2

POST login2

PUT login2

PATCH login2

DELETE login2

OPTIONS login2

general

api/password/email

Example request:

curl -X POST \
    "http://localhost/closor/public/api/password/email" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/api/password/email"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/password/email

Reset the given user's password.

Example request:

curl -X POST \
    "http://localhost/closor/public/api/password/reset" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/api/password/reset"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/password/reset

Display the form to request a password reset link.

Example request:

curl -X GET \
    -G "http://localhost/closor/public/password/reset" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/password/reset"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

null

HTTP Request

GET password/reset

Send a reset link to the given user.

Example request:

curl -X POST \
    "http://localhost/closor/public/password/email" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/password/email"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST password/email

Display the password reset view for the given token.

If no token is present, display the link request form.

Example request:

curl -X GET \
    -G "http://localhost/closor/public/password/reset/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/password/reset/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

null

HTTP Request

GET password/reset/{token}

Reset the given user's password.

Example request:

curl -X POST \
    "http://localhost/closor/public/password/reset" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/password/reset"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST password/reset

Invoke the controller method.

Example request:

curl -X GET \
    -G "http://localhost/closor/public/team" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "http://localhost/closor/public/team"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));
<<<<<<< HEAD =======

Example response (500):

{
    "message": "Server Error"
}
>>>>>>> b1173c075fed74b525c020ce92d2c003db646a15

HTTP Request

GET team